###setup
-
have to install redis for queue
-
install celery for backgound process
-
check redis-cli is working or not
-
run celery for background process command : celery -A django_server worker --loglevel=info
#APIS ##1) check status of task method : POST { "task_id": "celery_task_id" #pass celery task id }
##2) stop long running task method : POST { "task_id": "celery_task_id" #pass celery task id }
##3) request for a new youtube video method : GET pass youtube video id and task will run in background and immediate responce will return to user
There is a file named RandomSongs.py which play some random song from path /media/music
COMMAND *python3 manage.py RandomSongs.py"