Thanks Aldian , what about runworker ? On Sat, Mar 23, 2019 at 8:36 PM Aldian Fazrihady <[email protected]> wrote:
> Hi, > Mine is like this. It is still running after exiting ssh: > > nohup daphne -v 2 -b $AFCOM_DAPHNE_HOST -p $AFCOM_DAPHNE_PORT > afcom.asgi:application > $AFCOM_PROJECT_PATH/daphne/afcom.log 2>&1 & > > > On Sun, Mar 24, 2019 at 10:52 AM Adam Zedan <[email protected]> wrote: > >> I am trying to create a bash script that would run Daphne and runworker >> in the background. >> This is what I came up with so far >> >> >> echo "Killing Redis....." >> killall redis-server >> >> >> #echo "Starting redis Server....." >> redis-server --daemonize yes >> >> >> echo "Stopping NGINX......" >> sudo /etc/init.d/nginx stop >> >> >> echo "Starting NGINX......" >> sudo /etc/init.d/nginx start >> >> >> echo "Killing Daphne......" >> sudo kill -9 $(ps aux | grep 'daphne' | awk '{print $2}') >> >> >> echo "Starting Daphne....." >> /home/ec2-user/MyDomainVenv/bin/daphne -b 0.0.0.0 -p 8001 >> main.asgi:channel_layer >> 2>> ./daphne.log & >> >> >> echo "Starting Django worker thread...." >> #nohup python ./manage.py runworker 2>>./daphneWorker.log >&2 & >> python ./manage.py runworker >> >> >> However it seems like run worker simply terminates when my ssh session >> expires. I tried nohup statement as well. >> How did you fix this problem ? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/b2a43f85-9b9a-48bf-918d-c70a70b1b80b%40googlegroups.com >> <https://groups.google.com/d/msgid/django-users/b2a43f85-9b9a-48bf-918d-c70a70b1b80b%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Django users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/django-users/chqoK7I_v4A/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAN7EoAaXtyij5N1TgL7xL6-sghwvMXUDn7ab12%2Bc4rPxTP6rHA%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAN7EoAaXtyij5N1TgL7xL6-sghwvMXUDn7ab12%2Bc4rPxTP6rHA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACbvB%2B%2BepGFhiCRTGenLjhXKD9toFNpUur3qyqcRDv_p%3DNPwuQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

