Browse Source

improve spider watcher

master
filesite 6 days ago
parent
commit
0f841b7095
  1. 5
      spider_watcher.sh

5
spider_watcher.sh

@ -1,12 +1,11 @@
#!/bin/sh #!/bin/sh
## spider watcher, work with start_cloud_in_container.sh ## spider watcher, work with start_cloud_in_container.sh
script_root=$(dirname $0)
cd $script_root
watcher() watcher()
{ {
# you should change this directory path
script_root='~/Develop/machete_hero/'
spider_num=`ps -ef | grep 'node spider.mjs' | grep -v grep | wc -l` spider_num=`ps -ef | grep 'node spider.mjs' | grep -v grep | wc -l`
if [ $spider_num -lt 1 ]; then if [ $spider_num -lt 1 ]; then

Loading…
Cancel
Save