lyst / celery-statsd Goto Github PK
View Code? Open in Web Editor NEWSend data about Celery events to statsd
License: GNU Lesser General Public License v3.0
Send data about Celery events to statsd
License: GNU Lesser General Public License v3.0
Using this plugin with Celery 4.0.2 leads to exceptions such as the following:
2017-08-21 02:06:22,588 - celery.utils.dispatch.signal - ERROR - Signal handler <function statsd_after_task_publish at 0x7fe039437ed8> raised: TypeError('tuple indices must be integers, not str',)
Traceback (most recent call last):
File "/var/lib/virtualenv/lib/python2.7/site-packages/celery/utils/dispatch/signal.py", line 227, in send
response = receiver(signal=self, sender=sender, **named)
File "/var/lib/virtualenv/lib/python2.7/site-packages/celery_statsd/__init__.py", line 87, in statsd_after_task_publish
stop_timer("enqueue", task_key(sender), body['id'])
TypeError: tuple indices must be integers, not str
Protocol version 2 is the default from Celery 4.0. 3.1.25 offers both versions.
The difference here is that id
will be in headers
in version2, rather than body
.
So both could be supported by doing something like
task_id = headers.get('id') or body.get('id')
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.