Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

20 lignes
295 B

  1. #!/usr/bin/python
  2. import time
  3. import gearman
  4. def toUpper(worker, job):
  5. r = job.data.upper()
  6. print r
  7. return r
  8. def main():
  9. worker = gearman.GearmanWorker(['localhost:4730'])
  10. worker.register_task('ToUpper', toUpper)
  11. worker.work()
  12. if __name__ == '__main__':
  13. main()