Repository navigation
Run tasks via management command #99
Replies: 2 comments 5 replies
|
Hi @tim-schilling, happy to see you here. 😊 Can you elaborate a bit more? As I understand your suggestion this far, you want a command like: python manage.py run_once path/to/tasks.py::my_taskAnd the reason for it being, because you can't run the daemon locally, reliably? How do you run the workers or are you using an immediate backend? Or is this for development and testing? We can also chat about it later in person if you want. I certainly be happy to further explore this or any other DX improvements. Cheers |
I mentioned on Mastodon too, but I wrote this a while back https://codeberg.org/kfdm/django-inspect-tasks While I need to update the readme, the basic idea is
Happy to work with others to see if there's something that could be improved here to be more useful/reliable, but also fine if another solution ends up being better :) |
Uh oh!
There was an error while loading. Please reload this page.
I realized that my daily crontask is difficult to schedule locally. Having a helper management command to run it explicitly would improve the DX locally. I think it would look up the tasks that are registered and allow the user to call it by the name it's registered as.
I'm not super tied to it, but realized this may be a quality of life improvement for others too.
All reactions