0

I have a custom django management command that is constantly running through the supervisor (keep alive)

I need under certain circumstances (for example, a signal in the project, or a change in the database) the django management process reacted to these changes.

Tried looking for something similar but can't seem to find a simple implementation.

UPD: In the management command I start the stream process to the twitter API to track new tweets for the tags from django database. When adding a new tag to the database, I want to restart the stream connection.

7
  • What's the data and what will your command do with the data? What does your management command do? Can you add your management command to the question? Commented Nov 29, 2021 at 20:09
  • Any kind of IPC will do. Commented Nov 29, 2021 at 20:12
  • In the management command I start the stream process to the twitter API to track new tweets for the tags from django database. When adding a new tag to the database, I want to restart the stream connection. Commented Nov 29, 2021 at 20:17
  • Something like channels would potentially work here. A quick and dirty solution would be to just poll the DB and react when there is a change Commented Nov 29, 2021 at 20:26
  • This is exactly the problem. How does Django management command receive signal from django-channels? Commented Nov 29, 2021 at 20:29

0

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.