Commit 370a8ac0 authored by Lukáš Lalinský's avatar Lukáš Lalinský

Add a way to restrict imported submissions by IDs

parent 30a7c920
......@@ -107,14 +107,19 @@ def import_submission(conn, submission, index=None):
return fingerprint
def import_queued_submissions(conn, limit=50, index=None):
def import_queued_submissions(conn, limit=50, index=None, ids=None):
Import the given submission into the main fingerprint database
query = == False).limit(limit).order_by(
query = == False).order_by(
if ids is not None:
query = query.whhere(
if limit is not None:
query = query.limit(limit)
count = 0
for submission in conn.execute(query):
import_submission(conn, submission, index=index)
count += 1
logger.debug("Imported %d submissions", count)
return count
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment