tvgrabbers / tvgrabnlpy

Deze versie is deprecated zie: tvgrabpyAPI
https://github.com/tvgrabbers/tvgrabpyAPI
GNU General Public License v2.0
27 stars 8 forks source link

Running Once #60

Closed raymonvdm closed 8 years ago

raymonvdm commented 8 years ago

I`m using tvgrabnlpy for some time now. But once in a while if have an issue with the script running multiple times.

Is it possible to include some sort of lockfile to prevent it from running multiple times?

I`m starting the script using cron every night at 02:00 but it seems to be running for more then 24hrs from time to time?

0 2 * * * /home/xmlgrab/tv_grab_nl.py --quiet --config-file /home/xmlgrab/.xmltv/tv_grab_nl_py.conf --cache /home/xmlgrab/.xmltv/program_cache --output /var/www/xmltv.home.local/new/tv_grab_file.xml

hikavdh commented 8 years ago

What version? As of somewhere 2.1 The script will quit after half an hour of inactivity. So if it is running that long, I would be interested in a log. About the time, you best run after 5. Especially between 12 and 4 not all sources have done their date-switch.and you will see failures. tvgids.tv is the latest, sometimes even after 5 you still get the previous day. I can see if such a lock is possible, but it is running as python2, so I would have to find a way that won't interfere with other python scripts!

raymonvdm commented 8 years ago

root@server:/home/xmlgrab# ./tv_grab_nl.py -V The Netherlands: tv_grab_nl_py (Version: 2.1.10-p20150726-beta)

hikavdh commented 8 years ago

So start by upgrading to the present 2.2.11 https://github.com/tvgrabbers/tvgrabnlpy/releases/tag/stable-2.2.11

hikavdh commented 8 years ago

And run a fresh --configure The first run the config file will get upgraded automatically, but not updated. Also the cash will get updated to the present sqlite database. (same name but with extension .db) Check yoy new config file, there are a lot of new sources and settings,.

raymonvdm commented 8 years ago

The new version needs Python 2.7.9 but i only have 2.7.6 in my Distro (Ubuntu 14.04 LTS) Do i really need .9 or can i change the script to accept 2.7.6 ?

hikavdh commented 8 years ago

It downloads a file from github over https. https support in pre 2.7.9 is unreliable. Actually 2.7.9 is a mainly a backport from 3.x from among others proper https support.