|
|
@@ -374,15 +374,15 @@ class QWARC: |
|
|
|
else: |
|
|
|
# Really nothing to do anymore |
|
|
|
break |
|
|
|
id, itemType, itemValue, status = result |
|
|
|
cursor.execute('UPDATE items SET status = ? WHERE id = ?', (STATUS_INPROGRESS, id)) |
|
|
|
id_, itemType, itemValue, status = result |
|
|
|
cursor.execute('UPDATE items SET status = ? WHERE id = ?', (STATUS_INPROGRESS, id_)) |
|
|
|
|
|
|
|
session = self._freeSessions.popleft() |
|
|
|
item = self._make_item(itemType, itemValue, session, DEFAULT_HEADERS) |
|
|
|
task = asyncio.ensure_future(item.process()) |
|
|
|
#TODO: Is there a better way to add custom information to a task/coroutine object? |
|
|
|
task.taskType = 'process' |
|
|
|
task.id = id |
|
|
|
task.id = id_ |
|
|
|
task.itemType = itemType |
|
|
|
task.itemValue = itemValue |
|
|
|
task.item = item |
|
|
|