mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-12-14 03:56:08 +00:00
Push newly created watches directly into the update check Queue.
This commit is contained in:
@@ -310,7 +310,10 @@ def api_watch_add():
|
||||
global messages
|
||||
|
||||
# @todo add_watch should throw a custom Exception for validation etc
|
||||
datastore.add_watch(url=request.form.get('url').strip(), tag=request.form.get('tag').strip())
|
||||
new_uuid = datastore.add_watch(url=request.form.get('url').strip(), tag=request.form.get('tag').strip())
|
||||
# Straight into the queue.
|
||||
update_q.put(new_uuid)
|
||||
|
||||
messages.append({'class': 'ok', 'message': 'Watch added.'})
|
||||
return redirect(url_for('main_page'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user