Compare commits

..

1 Commits

Author SHA1 Message Date
dgtlmoon
30515c0e9f More debug around queue size 2024-11-10 10:21:18 +01:00
6 changed files with 7 additions and 44 deletions

View File

@@ -4,7 +4,7 @@ In any commercial activity involving 'Hosting' (as defined herein), whether in p
# Commercial License Agreement
This Commercial License Agreement ("Agreement") is entered into by and between Web Technologies s.r.o. here-in ("Licensor") and (your company or personal name) _____________ ("Licensee"). This Agreement sets forth the terms and conditions under which Licensor provides its software ("Software") and services to Licensee for the purpose of reselling the software either in part or full, as part of any commercial activity where the activity involves a third party.
This Commercial License Agreement ("Agreement") is entered into by and between Mr Morresi (the original creator of this software) here-in ("Licensor") and (your company or personal name) _____________ ("Licensee"). This Agreement sets forth the terms and conditions under which Licensor provides its software ("Software") and services to Licensee for the purpose of reselling the software either in part or full, as part of any commercial activity where the activity involves a third party.
### Definition of Hosting

View File

@@ -84,7 +84,7 @@ csrf = CSRFProtect()
csrf.init_app(app)
notification_debug_log=[]
# Locale for correct presentation of prices etc
# get locale ready
default_locale = locale.getdefaultlocale()
logger.info(f"System locale default is {default_locale}")
try:
@@ -159,21 +159,6 @@ def _jinja2_filter_pagination_slice(arr, skip):
return arr
def app_get_system_time():
from zoneinfo import ZoneInfo # Built-in timezone support in Python 3.9+
system_timezone = datastore.data['settings']['application'].get('timezone')
if not system_timezone:
system_timezone = os.environ.get("TZ")
try:
system_zone = ZoneInfo(system_timezone)
except Exception as e:
logger.warning(f'Warning, unable to use timezone "{system_timezone}" defaulting to UTC- {str(e)}')
system_zone = ZoneInfo("UTC") # Fallback to UTC if the timezone is invalid
return system_zone
@app.template_filter('format_seconds_ago')
def _jinja2_filter_seconds_precise(timestamp):
if timestamp == False:
@@ -258,9 +243,6 @@ def changedetection_app(config=None, datastore_o=None):
# (instead of the global var)
app.config['DATASTORE'] = datastore_o
# Just to check (it will output some debug if not)
app_get_system_time()
login_manager = flask_login.LoginManager(app)
login_manager.login_view = 'login'
app.secret_key = init_app_secret(config['datastore_path'])
@@ -900,7 +882,6 @@ def changedetection_app(config=None, datastore_o=None):
@login_optionally_required
def settings_page():
from changedetectionio import forms
from datetime import datetime
default = deepcopy(datastore.data['settings'])
if datastore.proxy_list is not None:
@@ -968,13 +949,6 @@ def changedetection_app(config=None, datastore_o=None):
else:
flash("An error occurred, please see below.", "error")
system_timezone = app_get_system_time()
system_time = datetime.now(system_timezone)
# Fallback for locale formatting
formatted_system_time = system_time.strftime("%Y-%m-%d %H:%M:%S %Z%z") # Locale-aware time
output = render_template("settings.html",
api_key=datastore.data['settings']['application'].get('api_access_token'),
emailprefix=os.getenv('NOTIFICATION_MAIL_BUTTON_PREFIX', False),
@@ -982,9 +956,7 @@ def changedetection_app(config=None, datastore_o=None):
form=form,
hide_remove_pass=os.getenv("SALTED_PASS", False),
min_system_recheck_seconds=int(os.getenv('MINIMUM_SECONDS_RECHECK_TIME', 3)),
settings_application=datastore.data['settings']['application'],
system_time=formatted_system_time,
timezone_name=system_timezone
settings_application=datastore.data['settings']['application']
)
return output
@@ -1653,7 +1625,7 @@ def changedetection_app(config=None, datastore_o=None):
threading.Thread(target=notification_runner).start()
# Check for new release version, but not when running in test/build or pytest
if not os.getenv("GITHUB_REF", False) and not strtobool(os.getenv('DISABLE_VERSION_CHECK', 'no')):
if not os.getenv("GITHUB_REF", False) and not config.get('disable_checkver') == True:
threading.Thread(target=check_for_new_version).start()
return app
@@ -1737,6 +1709,7 @@ def notification_runner():
def ticker_thread_check_time_launch_checks():
import random
from changedetectionio import update_worker
proxy_last_called_time = {}
recheck_time_minimum_seconds = int(os.getenv('MINIMUM_SECONDS_RECHECK_TIME', 3))

View File

@@ -52,8 +52,7 @@ class model(dict):
'schema_version' : 0,
'shared_diff_access': False,
'webdriver_delay': None , # Extra delay in seconds before extracting text
'tags': {}, #@todo use Tag.model initialisers
'timezone': None,
'tags': {} #@todo use Tag.model initialisers
}
}
}

View File

@@ -78,10 +78,6 @@
{{ render_checkbox_field(form.application.form.empty_pages_are_a_change) }}
<span class="pure-form-message-inline">When a request returns no content, or the HTML does not contain any text, is this considered a change?</span>
</div>
<div class="pure-control-group">
<p><strong>Local Time:</strong> {{ system_time }}</p>
<p><strong>Timezone:</strong> {{ timezone_name }}</p>
</div>
{% if form.requests.proxy %}
<div class="pure-control-group inline-radio">
{{ render_field(form.requests.form.proxy, class="fetch-backend-proxy") }}

View File

@@ -61,12 +61,6 @@ services:
#
# If you want to watch local files file:///path/to/file.txt (careful! security implications!)
# - ALLOW_FILE_URI=False
#
# For complete privacy if you don't want to use the 'check version' / telemetry service
# - DISABLE_VERSION_CHECK=true
#
# A valid timezone name to run as (for scheduling watch checking) see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# - TZ=America/Los_Angeles
# Comment out ports: when using behind a reverse proxy , enable networks: etc.
ports:

View File

@@ -96,3 +96,4 @@ babel
# Needed for > 3.10, https://github.com/microsoft/playwright-python/issues/2096
greenlet >= 3.0.3