Skip to content

Instantly share code, notes, and snippets.

View db42's full-sized avatar

Dushyant Bansal db42

View GitHub Profile
@harleyholt
harleyholt / gearman-worker-example.py
Created September 21, 2011 22:38
Example Python Gearman Worker (for python Gearman 2.0)
from gearman import GearmanWorker
# The function that will do the work
def echoer(worker, job):
print job.data
return job.data
# Establish a connection with the job server on localhost--like the client,
# multiple job servers can be used.
worker = GearmanWorker(['127.0.0.1'])