Don't try and update an empty list of URLs
This commit is contained in:
parent
d347a17d63
commit
bd0cc3863e
1 changed files with 3 additions and 0 deletions
|
@ -59,6 +59,9 @@ class IndexDatabase:
|
|||
return [BatchInfo(url, user_id_hash, status) for url, user_id_hash, status in results]
|
||||
|
||||
def update_batch_status(self, batch_urls: list[str], status: BatchStatus):
|
||||
if not batch_urls:
|
||||
return
|
||||
|
||||
sql = """
|
||||
UPDATE batches SET status = %(status)s
|
||||
WHERE url IN %(urls)s
|
||||
|
|
Loading…
Reference in a new issue