How do I restart the scrapyd daemon?

前端 未结 3 977
故里飘歌
故里飘歌 2021-01-15 06:45

I\'ve installed the scrapyd daemon on an EC2 server exactly as described in the documentation. Now I\'ve changed some of the configuration variables in /etc/scrapyd/c

相关标签:
3条回答
  • 2021-01-15 06:59

    Debian/Ubuntu:

    sudo /etc/init.d/scrapyd restart
    
    0 讨论(0)
  • 2021-01-15 07:05

    This turned out to be pretty simple.

    Kill the process like this:

    kill -INT $(cat /var/run/scrapyd.pid)
    

    Then restart it like this:

    /usr/bin/python /usr/local/bin/twistd -ny /usr/share/scrapyd/scrapyd.tac -u scrapy -g nogroup --pidfile /var/run/scrapyd.pid -l /var/log/scrapyd/scrapyd.log &
    

    As far as I can tell, both commands need to be run as root.

    0 讨论(0)
  • 2021-01-15 07:12

    If you have installed scrapyd via apt on an Ubuntu or Debian machine, the following should work:

    sudo service scrapyd reload
    

    Whether it will persist your scheduled spider runs I do not know know, however.

    0 讨论(0)
提交回复
热议问题