Source

beanstalkt / beanstalkt / demo.py

Diff from to

beanstalkt/demo.py

 
 def put():
   client.put("A job to work on", callback=lambda s: show(
-      "Queued a job with jid %d", s, reserve))
+      "Queued a job with id %d", s, reserve))
 
 def reserve():
   client.reserve(callback=lambda s: show(
-      "Reserved job %s", s, lambda: delete(s["jid"])))
+      "Reserved job %s", s, lambda: delete(s["id"])))
 
-def delete(jid):
-  client.delete(jid, callback=lambda s: show(
-      "Deleted job with jid %d", jid, stop))
+def delete(job_id):
+  client.delete(job_id, callback=lambda s: show(
+      "Deleted job with id %d", job_id, stop))
 
 client = beanstalkt.Client()
 client.connect(put)