Task crawl result now logged in a database

This commit is contained in:
Simon
2018-06-12 11:03:45 -04:00
parent 011b8455a7
commit 6d48f1f780
6 changed files with 70 additions and 29 deletions

View File

@@ -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"}'