mirror of
https://github.com/simon987/od-database.git
synced 2025-12-11 14:08:51 +00:00
Completed tasks are now fetched by the TaskDispatcher
This commit is contained in:
@@ -116,9 +116,11 @@ class TaskManagerDatabase:
|
||||
cursor = conn.cursor()
|
||||
|
||||
cursor.execute("SELECT status_code, file_count, start_time, end_time, website_id"
|
||||
" FROM TaskResult WHERE indexed_time != NULL")
|
||||
" FROM TaskResult WHERE indexed_time IS NULL")
|
||||
db_result = cursor.fetchall()
|
||||
print(len(db_result))
|
||||
|
||||
cursor.execute("UPDATE TaskResult SET indexed_time = CURRENT_TIMESTAMP")
|
||||
cursor.execute("UPDATE TaskResult SET indexed_time = CURRENT_TIMESTAMP WHERE indexed_time IS NULL")
|
||||
conn.commit()
|
||||
|
||||
return [TaskResult(r[0], r[1], r[2], r[3], r[4]) for r in db_result]
|
||||
return [TaskResult(r[0], r[1], r[2], r[3], r[4]) for r in db_result]
|
||||
|
||||
Reference in New Issue
Block a user