Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lupino/py3k-gearman
a python3 gearman client wraper on libgearman
https://github.com/lupino/py3k-gearman
Last synced: about 1 month ago
JSON representation
a python3 gearman client wraper on libgearman
- Host: GitHub
- URL: https://github.com/lupino/py3k-gearman
- Owner: Lupino
- Created: 2013-08-05T12:23:10.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-08-08T03:50:07.000Z (over 11 years ago)
- Last Synced: 2024-04-14T15:57:38.299Z (9 months ago)
- Language: C
- Size: 141 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A python3 gearman client wraper on libgearman
# client
>>> import gearman
>>> client = gearman.Client()
>>> client.add_servers('localhost:4730')
>>> client.do('echo', 'hello')# worker
>>> import gearman
>>> worker = gearman.Worker()
>>> worker.add_servers('localhost:4730')
>>> def echo(job):
... print(job.workload)
... job.complete(job.workload)
>>> worker.add_func('echo', echo)
>>> worker.work()