We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 63274db + 5eba318 commit 18cc843Copy full SHA for 18cc843
redash/tasks.py
@@ -171,8 +171,10 @@ def refresh_queries():
171
def cleanup_tasks():
172
# in case of cold restart of the workers, there might be jobs that still have their "lock" object, but aren't really
173
# going to run. this job removes them.
174
-
175
lock_keys = redis_connection.keys("query_hash_job:*") # TODO: use set instead of keys command
+ if not lock_keys:
176
+ return
177
+
178
query_tasks = [QueryTask(job_id=j) for j in redis_connection.mget(lock_keys)]
179
180
logger.info("Found %d locks", len(query_tasks))
0 commit comments