Giter Site home page Giter Site logo

samuel / python-gearman Goto Github PK

View Code? Open in Web Editor NEW
69.0 9.0 17.0 188 KB

(maintenance transfered to http://github.com/Yelp/python-gearman) Gearman library for Python.

Home Page: http://github.com/mtai/python-gearman

License: Other

Python 100.00%

python-gearman's Introduction

python-gearman's People

Contributors

esumner avatar justinazoff avatar rhettg avatar samuel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-gearman's Issues

GearmanWorker cannot grab_job_uniq

The GearmanWorker does not have a mode in which it can issue a 'grab_job_uniq' request. This limits the utility of the python-gearman library. I forked the project and created a version of GearmanWorker that always issues a 'grab_job_uniq' request for my own needs. I am willing to modify my code to make this a parameter and submit a patch if anyone is interested in this functionality.

Let me know.

Thanks,
Talentless

Sample code incorrect

The sample code on http://samuelks.com/python-gearman/docs/ does not work against v2.02 of the library. For example:

from gearman import *
worker = GearmanWorker(["127.0.0.1"])
worker.register_function("echo", lambda job:job.arg)
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'GearmanWorker' object has no attribute 'register_function'

client = GearmanClient(["127.0.0.1"])
res = client.do_task(Task("echo", "foo"))
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'GearmanClient' object has no attribute 'do_task'

I'm guessing this is because various methods and objects have been renamed.

Possible Memory Leak in client

If you have a gearman client like the one below and you want to submit many jobs, then you run into a memory leak.

client = gearman.GearmanClient(server)
for job in many_many_jobs:
req = client.submit_job(task, data)
...

The problem is in the python module client_handler.py, where every job is stored in a dictionary but never deleted.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.