Using timeout to Limit the Voting Process
Last time, i talked about exiting the process if it takes too long by checking the time difference since process started (here)
Apparently, it didn't work quite well, and I was still able to see processes being stuck and couldn't exit properly.
Luckily I found out there is a command
timeout which works like a charm:
timeout 5 sleep 100 will exit the process after 5 seconds and sets $? to 124 error code.
timeout 5 sleep 4 will exit the process after 4 seconds and sets $? to 0 error code.
I have set timeout 10 minutes (600 seconds) for voting process to run.
And so far so good!
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Thank you for reading ^^^^^^^^^^^^^^^
- Steem Blockchain Tools
- Computing & Technology
- Download Youtube Video
- Find Cheap & Bargin VPS: VPS Database
- Online Software and Tools
- Online File/Video Merger
If you like my work, please:
- Buy Me a Coffee, Thanks!
- Become my Sponsor, Thanks!
- Voting for me:
https://steemit.com/~witnesses type in justyy and click VOTE
- Delegate SP: https://steemyy.com/sp-delegate-form/?delegatee=justyy
- Vote @justyy as Witness: https://steemyy.com/witness-voting/?witness=justyy&action=approve
- Set @justyy as Proxy: https://steemyy.com/witness-voting/?witness=justyy&action=proxy
Alternatively, you can vote witness or set proxy here: https://steemit.com/~witnesses