Refactor tests for notification error log handler (#404)

This commit is contained in:
dgtlmoon
2022-02-04 20:54:20 +01:00
committed by GitHub
parent abaec224f6
commit 22ef9afb93
5 changed files with 75 additions and 34 deletions

View File

@@ -909,7 +909,6 @@ def changedetection_app(config=None, datastore_o=None):
@app.route("/api/delete", methods=['GET'])
@login_required
def api_delete():
uuid = request.args.get('uuid')
datastore.delete(uuid)
flash('Deleted.')
@@ -1026,7 +1025,8 @@ def notification_runner():
# UUID wont be present when we submit a 'test' from the global settings
if 'uuid' in n_object:
datastore.update_watch(uuid=n_object['uuid'], update_obj={'last_error': "Notification error detected, please see logs."})
datastore.update_watch(uuid=n_object['uuid'],
update_obj={'last_notification_error': "Notification error detected, please see logs."})
log_lines = str(e).splitlines()
notification_debug_log += log_lines
@@ -1036,6 +1036,7 @@ def notification_runner():
# Thread runner to check every minute, look for new watches to feed into the Queue.
def ticker_thread_check_time_launch_checks():
from changedetectionio import update_worker