Code Monkey home page Code Monkey logo

celery-slack's People

Contributors

crflynn avatar peterataylor avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

celery-slack's Issues

I can't update to celery-slack v0.4.0

@crflynn I can't update to celery-slack v0.4.0

throws the following error:

Collecting celery-slack Using cached https://files.pythonhosted.org/packages/b3/c4/9c2c7e0e2633f2b573c1fcb7f0df333ece14f1af5a9d343b91649a2bef9e/celery_slack-0.4.0-py2.py3-none-any.whl Requirement already satisfied: ephem<4.0,>=3.7 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from celery-slack) (3.7.7.0) Collecting celery<3.2,<5.0,>=3.1,>=4.0 (from celery-slack) ERROR: Could not find a version that satisfies the requirement celery<3.2,<5.0,>=3.1,>=4.0 (from celery-slack) (from versions: 0.1.2, 0.1.4, 0.1.6, 0.1.7, 0.1.8, 0.1.10, 0.1.11, 0.1.12, 0.1.13, 0.1.14, 0.1.15, 0.2.0, 0.3.0, 0.3.7, 0.3.20, 0.4.0, 0.4.1, 0.6.0, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 2.2.9, 2.2.10, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.5, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.8, 3.0.9, 3.0.10, 3.0.11, 3.0.12, 3.0.13, 3.0.14, 3.0.15, 3.0.16, 3.0.17, 3.0.18, 3.0.19, 3.0.20, 3.0.21, 3.0.22, 3.0.23, 3.0.24, 3.0.25, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.14, 3.1.15, 3.1.16, 3.1.17, 3.1.18, 3.1.19, 3.1.20, 3.1.21, 3.1.22, 3.1.23, 3.1.24, 3.1.25, 3.1.26.post1, 3.1.26.post2, 4.0.0rc3, 4.0.0rc4, 4.0.0rc5, 4.0.0rc6, 4.0.0rc7, 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.2.0rc1, 4.2.0rc2, 4.2.0rc3, 4.2.0rc4, 4.2.0, 4.2.1, 4.2.2, 4.3.0rc1, 4.3.0rc2, 4.3.0rc3, 4.3.0, 4.4.0rc1, 4.4.0rc2, 4.4.0rc3) ERROR: No matching distribution found for celery<3.2,<5.0,>=3.1,>=4.0 (from celery-slack)
What changed between v0.3 and v0.4 ?

Originally posted by @UtsavPreet in #19 (comment)

Allow exclude some Exceptions from celery-slack

Sometimes you may want to raise an exception, but not being notified.
I mean, you can have a task that is "normal" that it raises exceptions frequently and you don't want to be notified, but you want to raise to set the task in a failed state and let the caller know the task has
failed and let it access the traceback.

Currently, I do not know how to do it, because I want to exclude exceptions by task, not globally but the on_failure method has no direct access to the task.

Add hostname to message

When you are running celery workers on multiple servers and an exception occurs, you can not know what sever it was.

In my company, when we are not using Celery, we send exceptions manually to Slack, and we send the exception with a custom username, like "service_name@sever_name". It is nice and helpful.

Could you add the ability to change the username or simply add hostname in the message body?

Slack messages for failure to send message to broker

Referencing this comment which requested Slack message for when no connection is available to the broker and the task fails to send.

another question, how can i catch Exception from Celery's broker and send to slack.
like my broker(e.g. RabbitMQ ) suddenly shutdown, but it could not send message to Slack though i got the connection error in logs

periodic_task not being sent to slack.

Firstly, thank you for an awesome too.

I have a small issue where normal @task are successfully sent to slack but @periodic_task are not being sent. Any ideas why this might be happening?

Passing **options makes celery worker fail to start

I was just trying to use this library, and following the documentation through this error.

Versions
Python: 3.6
Celery: 4.3
Redis: 3.3
Kombu: 4.4
Celery-Slack: 0.3.0

Code Snippet

options = { 'flower_base_url': 'http://localhost:5555', 'show_broker': True, } SLACK_WEBHOOK = 'https://hooks.slack.com/services/xxxxxx/xxxx/xxxxxxxx' app = Celery('tasks') slack_app = Slackify(app, SLACK_WEBHOOK, **options) app.config_from_object('django.conf:settings') app.autodiscover_tasks()

Error Trace:
[2019-10-12 12:26:38,452: CRITICAL/MainProcess] Unrecoverable error: TypeError("wrapped_func() got an unexpected keyword argument 'timeout'",) Traceback (most recent call last): File "/Users/utsav/Desktop/abc/venv/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start self.blueprint.start(self) File "/Users/utsav/Desktop/abc/venv/lib/python3.6/site-packages/celery/bootsteps.py", line 119, in start step.start(parent) File "/Users/utsav/Desktop/abc/venv/lib/python3.6/site-packages/celery/bootsteps.py", line 369, in start return self.obj.start() File "/Users/utsav/Desktop/abc/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 318, in start blueprint.start(self) File "/Users/utsav/Desktop/abc/venv/lib/python3.6/site-packages/celery/bootsteps.py", line 119, in start step.start(parent) File "/Users/utsav/Desktop/abc/venv/lib/python3.6/site-packages/celery/worker/consumer/connection.py", line 23, in start c.connection = c.connect() File "/Users/utsav/Desktop/abc/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 405, in connect conn = self.connection_for_read(heartbeat=self.amqheartbeat) File "/Users/utsav/Desktop/abc/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 412, in connection_for_read self.app.connection_for_read(heartbeat=heartbeat)) File "/Users/utsav/Desktop/abc/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 436, in ensure_connected callback=maybe_shutdown, File "/Users/utsav/Desktop/abc/venv/lib/python3.6/site-packages/kombu/connection.py", line 422, in ensure_connection callback, timeout=timeout) TypeError: wrapped_func() got an unexpected keyword argument 'timeout'

I fixed this error, by replacing **options with options while initialising slack_app.

Is it a know issue ? or something I'm missing.

Thanks

Disable start up/shut down messages

It's fantastic to have the ability to disable successful messages but an option to disable start up/shut down messages would be much appreciated.

No failure notifications for timeout task

Is this intended?. For testing I'm using time_limit=3 on the task, which returns the following on a long running task:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/billiard/pool.py", line 684, in on_hard_timeout
    raise TimeLimitExceeded(job._timeout)
billiard.exceptions.TimeLimitExceeded: TimeLimitExceeded(3,)

And the task is marked as a failure in Flower, but not getting a notification in Slack from celery-slack.

Using 0.3.0.

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.