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.
1 parent 355d93c commit f0630bfCopy full SHA for f0630bf
optimizerapi/worker.py
@@ -11,7 +11,12 @@
11
else:
12
REDIS_URL = "redis://localhost:6379"
13
14
+if "WORKER_TIMEOUT" in os.environ:
15
+ WORKER_TIMEOUT = int(os.environ["WORKER_TIMEOUT"])
16
+else:
17
+ WORKER_TIMEOUT = 180
18
+
19
if __name__ == "__main__":
20
redis = Redis.from_url(REDIS_URL)
- queue = Queue(connection=redis)
21
+ queue = Queue(connection=redis, deafult_timeout=WORKER_TIMEOUT)
22
Worker(queue).work()
0 commit comments