lilspikey / django-background-task

A database-backed work queue for Django
BSD 3-Clause "New" or "Revised" License
107 stars 200 forks source link

best way to relaunch background task after a new docker-compose build and launch of container #33

Open fcoppey opened 4 years ago

fcoppey commented 4 years ago

I tried to install supervisord but could never make it work. always exiting right after launch: 2020-07-06 15:57:56,453 INFO supervisord started with pid 27437 2020-07-06 15:57:57,457 INFO spawned: 'tasks' with pid 27438 2020-07-06 15:57:58,325 INFO success: tasks entered RUNNING state, process has stayed up for > than 0 seconds (startsecs) 2020-07-06 15:57:58,405 INFO exited: tasks (exit status 1; not expected)

here is my config: [program:tasks] directory=/home/apptitude/my_docker_folder/ command=sudo /usr/local/bin/docker-compose exec web python manage.py process_tasks startsecs=0 autorestart=false user=root

Any help welcome... so annoying to relaunch manually after each new docker-compose relaunch of my django server.

thanks