Friday, October 21, 2011

Notes - Giving more stability to the mood lamp

I had some troubles setting up supervised process for the python binary running the mood lamp, I guess it might be related with the fact that python is also calling gnuplot subprocess via os.system call, and daemontools might be a bit lost with that (not sure).

So in order to have the binary running more stable and making it strong against spurious crashes I did a little script that is running under a screen session:

#!/bin/bash
CRASH_COUNTER=0
while : ; do
python ./animo_mundial.py
let CRASH_COUNTER=$CRASH_COUNTER+1
echo $CRASH_COUNTER > /tmp/animo_crash_counter.txt
sleep 10
done

No comments:

 

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.