FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix a counter race condition (#348) · CKWebProject/mquery@0d9759e · GitHub

Repository navigation

Commit 0d9759e

Browse files
msm-code
authored
Fix a counter race condition (CERT-Polska#348)
1 parent 99c4123 commit 0d9759e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/tasks.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,14 @@ def query_ursadb(job_id: JobId, dataset_id: str, ursadb_query: str) -> None:
233233
)
234234

235235
batches = __get_batch_sizes(file_count)
236+
# add len(batches) new tasks, -1 to account for this task
237+
agent.add_tasks_in_progress(job, len(batches) - 1)
238+
236239
for batch in batches:
237240
agent.queue.enqueue(run_yara_batch, job_id, iterator, batch)
238241

239242
agent.db.dataset_query_done(job_id)
240243

241-
# add len(batches) new tasks, -1 to account for this task
242-
agent.add_tasks_in_progress(job, len(batches) - 1)
243-
244244

245245
def run_yara_batch(job_id: JobId, iterator: str, batch_size: int) -> None:
246246
"""Actually scans files, and updates a database with the results"""

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL