Reputation: 627
I am trying to create an asynchronous task using celery, but I am not achieving success.
I have a task that sends emails:
@shared_task()
def send_email_example(email_id):
...
I call it using the delay()
method:
class SomeModelExample:
...
def example(self):
...
send_email_example.delay(self.id)
Locally, I run the celery and can use it. However, in my server, when I use the method that calls the function it takes more than 30 seconds and I receive a status code 502.
I hope that my celery setup is ok, because my periodc tasks works.
Testing it myself I saw that the celery is really ok. The problem was with my tests on the server.
Upvotes: 0
Views: 236
Reputation: 738
At this stage I would try:
Upvotes: 1