Skip to content

Instantly share code, notes, and snippets.

@Jonty
Created March 25, 2013 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jonty/5237871 to your computer and use it in GitHub Desktop.
Save Jonty/5237871 to your computer and use it in GitHub Desktop.
Beanstalkd command runner example
import os
import beanstalkc
beanstalk = beanstalkc.Connection(host='localhost', port=14711)
while True:
job = beanstalk.reserve()
print "Running %s" % job.body
os.system(job.body)
job.delete()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment