diff --git a/__pycache__/app.cpython-36 (ManjaroBox's conflicted copy 2018-09-03).pyc b/__pycache__/app.cpython-36 (ManjaroBox's conflicted copy 2018-09-03).pyc new file mode 100755 index 0000000..bcac706 Binary files /dev/null and b/__pycache__/app.cpython-36 (ManjaroBox's conflicted copy 2018-09-03).pyc differ diff --git a/__pycache__/app.cpython-36.pyc b/__pycache__/app.cpython-36.pyc new file mode 100755 index 0000000..aae97ac Binary files /dev/null and b/__pycache__/app.cpython-36.pyc differ diff --git a/__pycache__/app.cpython-37.pyc b/__pycache__/app.cpython-37.pyc new file mode 100644 index 0000000..f3b7899 Binary files /dev/null and b/__pycache__/app.cpython-37.pyc differ diff --git a/__pycache__/callbacks.cpython-36.pyc b/__pycache__/callbacks.cpython-36.pyc new file mode 100755 index 0000000..446fc0c Binary files /dev/null and b/__pycache__/callbacks.cpython-36.pyc differ diff --git a/__pycache__/callbacks.cpython-37.pyc b/__pycache__/callbacks.cpython-37.pyc new file mode 100644 index 0000000..933378a Binary files /dev/null and b/__pycache__/callbacks.cpython-37.pyc differ diff --git a/__pycache__/config.cpython-36 (ManjaroBox's conflicted copy 2018-09-03).pyc b/__pycache__/config.cpython-36 (ManjaroBox's conflicted copy 2018-09-03).pyc new file mode 100755 index 0000000..72003ca Binary files /dev/null and b/__pycache__/config.cpython-36 (ManjaroBox's conflicted copy 2018-09-03).pyc differ diff --git a/__pycache__/config.cpython-36.pyc b/__pycache__/config.cpython-36.pyc new file mode 100755 index 0000000..8787c75 Binary files /dev/null and b/__pycache__/config.cpython-36.pyc differ diff --git a/__pycache__/config.cpython-37.pyc b/__pycache__/config.cpython-37.pyc new file mode 100644 index 0000000..35ea3da Binary files /dev/null and b/__pycache__/config.cpython-37.pyc differ diff --git a/__pycache__/config.pypy3-60.pyc b/__pycache__/config.pypy3-60.pyc new file mode 100755 index 0000000..ec14c17 Binary files /dev/null and b/__pycache__/config.pypy3-60.pyc differ diff --git a/__pycache__/database.cpython-36.pyc b/__pycache__/database.cpython-36.pyc new file mode 100755 index 0000000..0a42f1c Binary files /dev/null and b/__pycache__/database.cpython-36.pyc differ diff --git a/__pycache__/database.cpython-37.pyc b/__pycache__/database.cpython-37.pyc new file mode 100644 index 0000000..1305b87 Binary files /dev/null and b/__pycache__/database.cpython-37.pyc differ diff --git a/__pycache__/od_util.cpython-36.pyc b/__pycache__/od_util.cpython-36.pyc new file mode 100755 index 0000000..a3d072c Binary files /dev/null and b/__pycache__/od_util.cpython-36.pyc differ diff --git a/__pycache__/od_util.cpython-37.pyc b/__pycache__/od_util.cpython-37.pyc new file mode 100644 index 0000000..6896b10 Binary files /dev/null and b/__pycache__/od_util.cpython-37.pyc differ diff --git a/__pycache__/reddit_bot.cpython-36.pyc b/__pycache__/reddit_bot.cpython-36.pyc new file mode 100755 index 0000000..003ce7c Binary files /dev/null and b/__pycache__/reddit_bot.cpython-36.pyc differ diff --git a/__pycache__/reddit_bot.cpython-37.pyc b/__pycache__/reddit_bot.cpython-37.pyc new file mode 100644 index 0000000..0edfe61 Binary files /dev/null and b/__pycache__/reddit_bot.cpython-37.pyc differ diff --git a/__pycache__/tasks.cpython-36.pyc b/__pycache__/tasks.cpython-36.pyc new file mode 100755 index 0000000..a8d2b86 Binary files /dev/null and b/__pycache__/tasks.cpython-36.pyc differ diff --git a/__pycache__/tasks.cpython-37.pyc b/__pycache__/tasks.cpython-37.pyc new file mode 100644 index 0000000..bc7254f Binary files /dev/null and b/__pycache__/tasks.cpython-37.pyc differ diff --git a/api.py b/api.py index 6113c8e..3832437 100644 --- a/api.py +++ b/api.py @@ -31,7 +31,7 @@ def setup_api(app): oddb.logger.info("No queued tasks, creating a new one") try: - task = oddb.db.make_task_for_oldest() + task = oddb.db.make_task_for_oldest(name) except: oddb.logger.error("Couldn't create new task") abort(404) diff --git a/database.py b/database.py index 4cbd329..71079c3 100644 --- a/database.py +++ b/database.py @@ -161,7 +161,7 @@ class Database: "ORDER BY last_modified ASC LIMIT 1", (assigned_crawler, )) cursor.execute("SELECT id, website_id, url, priority, callback_type, callback_args FROM Queue " - "WHERE id=LAST_INSERT_ID()") + "WHERE id=LAST_INSERT_ROWID()") task = cursor.fetchone() return Task(task[1], task[2], task[3], task[4], task[5]) diff --git a/search/__pycache__/__init__.cpython-36.pyc b/search/__pycache__/__init__.cpython-36.pyc new file mode 100755 index 0000000..b189e92 Binary files /dev/null and b/search/__pycache__/__init__.cpython-36.pyc differ diff --git a/search/__pycache__/__init__.cpython-37.pyc b/search/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..d9971d1 Binary files /dev/null and b/search/__pycache__/__init__.cpython-37.pyc differ diff --git a/search/__pycache__/filter.cpython-37.pyc b/search/__pycache__/filter.cpython-37.pyc new file mode 100644 index 0000000..d1fd205 Binary files /dev/null and b/search/__pycache__/filter.cpython-37.pyc differ diff --git a/search/__pycache__/search.cpython-36 (ManjaroBox's conflicted copy 2018-09-03).pyc b/search/__pycache__/search.cpython-36 (ManjaroBox's conflicted copy 2018-09-03).pyc new file mode 100755 index 0000000..abbaf41 Binary files /dev/null and b/search/__pycache__/search.cpython-36 (ManjaroBox's conflicted copy 2018-09-03).pyc differ diff --git a/search/__pycache__/search.cpython-36.pyc b/search/__pycache__/search.cpython-36.pyc new file mode 100755 index 0000000..e2d5c4b Binary files /dev/null and b/search/__pycache__/search.cpython-36.pyc differ diff --git a/search/__pycache__/search.cpython-37.pyc b/search/__pycache__/search.cpython-37.pyc new file mode 100644 index 0000000..9a682f7 Binary files /dev/null and b/search/__pycache__/search.cpython-37.pyc differ diff --git a/test/__pycache__/__init__.cpython-36.pyc b/test/__pycache__/__init__.cpython-36.pyc new file mode 100755 index 0000000..8afad41 Binary files /dev/null and b/test/__pycache__/__init__.cpython-36.pyc differ