mirror of
https://github.com/simon987/od-database.git
synced 2025-12-14 15:19:03 +00:00
Task crawl result now logged in a database
This commit is contained in:
@@ -22,6 +22,7 @@ def task_put():
|
||||
|
||||
if request.json:
|
||||
try:
|
||||
website_id = request.json["website_id"]
|
||||
url = request.json["url"]
|
||||
priority = request.json["priority"]
|
||||
callback_type = request.json["callback_type"]
|
||||
@@ -29,7 +30,7 @@ def task_put():
|
||||
except KeyError:
|
||||
return abort(400)
|
||||
|
||||
task = Task(url, priority, callback_type, callback_args)
|
||||
task = Task(website_id, url, priority, callback_type, callback_args)
|
||||
tm.put_task(task)
|
||||
return '{"ok": "true"}'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user