Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
langdal committed Feb 25, 2025
1 parent fc692c7 commit 5d929f2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion optimizerapi/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def disconnect_check():
print("Found existing job")
except NoSuchJobError:
print("Creating new job")
job = queue.enqueue(do_run_work, body, job_id=job_id, result_ttl=TTL, job_timeout=WORKER_TIMEOUT, )
job = queue.enqueue(do_run_work, body, job_id=job_id, result_ttl=TTL, job_timeout=WORKER_TIMEOUT)
while job.return_value() is None:
if disconnect_check():
try:
Expand Down
5 changes: 0 additions & 5 deletions optimizerapi/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
else:
REDIS_URL = "redis://localhost:6379"

if "WORKER_TIMEOUT" in os.environ:
WORKER_TIMEOUT = int(os.environ["WORKER_TIMEOUT"])
else:
WORKER_TIMEOUT = 180

if __name__ == "__main__":
redis = Redis.from_url(REDIS_URL)
queue = Queue(connection=redis)
Expand Down

0 comments on commit 5d929f2

Please sign in to comment.