This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']) |