Merge branch '2.0.x' into devel

Conflicts:
	VERSION
	airtime_mvc/application/models/Schedule.php
	airtime_mvc/application/models/Show.php
	airtime_mvc/public/js/airtime/dashboard/helperfunctions.js
	install_minimal/include/airtime-constants.php
	python_apps/api_clients/api_client.py
	python_apps/pypo/pypocli.py
	python_apps/pypo/pypofetch.py
This commit is contained in:
Martin Konecny 2012-03-12 17:52:17 -04:00
commit 6f270bfb3d
21 changed files with 1664 additions and 293 deletions

View file

@ -15,6 +15,7 @@ from threading import Thread
from subprocess import Popen, PIPE
from datetime import datetime
from datetime import timedelta
from Queue import Empty
import filecmp
from api_clients import api_client
@ -478,6 +479,19 @@ class PypoFetch(Thread):
while True:
self.logger.info("Loop #%s", loops)
try:
"""
our simple_queue.get() requires a timeout, in which case we
fetch the Airtime schedule manually. It is important to fetch
the schedule periodically because if we didn't, we would only
get schedule updates via RabbitMq if the user was constantly
using the Airtime interface.
If the user is not using the interface, RabbitMq messages are not
sent, and we will have very stale (or non-existent!) data about the
schedule.
Currently we are checking every 3600 seconds (1 hour)
"""
message = self.fetch_queue.get(block=True, timeout=3600)
self.handle_message(message)
except Exception, e: