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 7321fd9 + 473c228 commit 9e8003aCopy full SHA for 9e8003a
content/ja/examples/application/job/redis/worker.py
@@ -8,11 +8,11 @@
8
# import os
9
# host = os.getenv("REDIS_SERVICE_HOST")
10
11
-q = rediswq.RedisWQ(name="job2", host="redis")
+q = rediswq.RedisWQ(name="job2", host=host)
12
print("Worker with sessionID: " + q.sessionID())
13
print("Initial queue state: empty=" + str(q.empty()))
14
while not q.empty():
15
- item = q.lease(lease_secs=10, block=True, timeout=2)
+ item = q.lease(lease_secs=10, block=True, timeout=2)
16
if item is not None:
17
itemstr = item.decode("utf=8")
18
print("Working on " + itemstr)
0 commit comments