Browse Source

Rename id to id_ to avoid clash with builtin

master
JustAnotherArchivist 3 years ago
parent
commit
5675118877
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      qwarc/__init__.py

+ 3
- 3
qwarc/__init__.py View File

@@ -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


Loading…
Cancel
Save