What is the best method to keep scrapyrt open/active even after reboot
See original GitHub issueI have been exploring many options on how to keep scrapyrt open and active even after reboot, but I am unsure what is best. I was thinking of using immortal.run. I have used tmux, but it eventually kills the scrapyrt process after sometime. Not sure how long it persists. I have also tried without success to write a bash script to start scrapyrt within a tmux session (new or existing) if the scrapyrt process is not active. Is immortal.run a good option? Is a simple bash script and using crontab (for example: @reboot) possible? I am open to any option that will work. Please share an example. Thanks. (I am currently using Ubuntu 18.04 VM on Azure)
Here is an example of my attempt at writing a script in bash:
#!/bin/bash
if ! pgrep -x "scrapyrt" > /dev/null
then
SESSION_NAME=coinSpider
tmux has-session -t $SESSION_NAME 2>/dev/null
if [ $? -ne 0 ]
then
tmux new-session -d -s $SESSION_NAME "$*"
fi
tmux attach -t $SESSION_NAME \; \
send-keys -t 'scrapyrt -p 9080 -i 0.0.0.0' C-m \;
fi
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
scrapinghub - Bountysource
I have been exploring many options on how to keep scrapyrt open and active even after reboot, but I am unsure what is...
Read more >Installation — scrapyrt 0.12 documentation
Spider.start_requests method. start_requests are executed by default when you run Scrapy Spider normally without ScrapyRT, but this method is NOT executed ...
Read more >How to get scrapyrt's POST meta data? - python - Stack Overflow
There is an unmerged PR in scrapyRT that adds support to pass extra parameters inthe POST request. 1) Patch resources.py file located in ......
Read more >scrapyrt - bytemeta
scrapyrt repo issues. ... Requesting max_items in scrapyrt. robinicole ... What is the best method to keep scrapyrt open/active even after reboot.
Read more >Scrapinghub scrapyrt Issues - Giters
Scrapinghub scrapyrt: HTTP API for Scrapy spiders. ... What is the best method to keep scrapyrt open/active even after reboot. Updated 2 years...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That documentation has the deployment to ubuntu server marked as
todo
since 2016.It’s 2022 and it’s still marked as todo since 2016