binarymatt / pyres

a resque clone in python
http://github.com/binarydud/pyres
MIT License
955 stars 130 forks source link

add enqueue & perform timestamps, add job hooks for accessing them #95

Closed joeshaw closed 12 years ago

joeshaw commented 12 years ago

Classes which implement the perform() method can now also implement before_perform() and after_perform() methods which take a metadata dict. These contain the args passed in, as well as timestamps for when the job was enqueued and when it was performed, and whether the job failed and was retried.


I'm using it mainly so I can track queue processing latency, and the amount of time it takes to process each job. I send them along to a statsd/graphite server.

binarymatt commented 12 years ago

finally getting back in the swing of things, i'm going to go ahead and merge this. Sorry for the long time.