2

I have 2 different Python applications using Celery connected to the same broker.

Server A has all my @tasks, but I need to execute this tasks from Server B. I cannot do the standard import tasks as it does not exist on server B.

How in Celery from server B can I run tasks from exist only on Server A?

i.e.

Server B:

from tasksFromSeverA import add
add.delay(4, 4)

Is there something in Celery that allows you send a signal to run say a task called 'Add' to the Broker?

1
  • Hey @Prometheus, Have you got any optimize solution for this? Commented Jan 16, 2019 at 12:16

1 Answer 1

3

As far as i know you can't execute a task in "Server B" that is not implemented in "Server B".

What you can do is execute a task in "Server A" from "Server B". You can achieve this using the send_task function as explained in this link:

http://celery.readthedocs.org/en/latest/faq.html#can-i-call-a-task-by-name

Sign up to request clarification or add additional context in comments.

1 Comment

sent task is what I was after, maybe I did not explain this very well. thank you for the linked. Now I know what it is called.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.