summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas NOEL <tnoel@entrouvert.com>2011-04-27 13:55:02 (GMT)
committerThomas NOEL <tnoel@entrouvert.com>2011-04-27 13:55:02 (GMT)
commitc4b67cd40d804e7db0eb87bfee6f82c38428c04a (patch)
tree9f120b74695d6e09a1d64bf7e4229bff0da1ebe3
parent571052dae5b9ea54852ddee0bae941a6aa51b4cb (diff)
parent127ef785fb4341f93ecfafc37c0f72f4be903530 (diff)
downloadsurveillao-c4b67cd40d804e7db0eb87bfee6f82c38428c04a.zip
surveillao-c4b67cd40d804e7db0eb87bfee6f82c38428c04a.tar.gz
surveillao-c4b67cd40d804e7db0eb87bfee6f82c38428c04a.tar.bz2
Merge branch 'master' of dev.entrouvert.org:surveillao
-rwxr-xr-xupdate-ao.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/update-ao.py b/update-ao.py
index f001016..ce5f444 100755
--- a/update-ao.py
+++ b/update-ao.py
@@ -3,9 +3,10 @@
import os
import sys
+import datetime
+import site
# virtualenv
-import site
site.addsitedir("/home/thomas/surveillao.ve/lib/python2.5/site-packages")
# django init
sys.path.append('/home/thomas/surveillao.ve/')
@@ -14,11 +15,14 @@ os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from surveillao.base.models import Feed
for feed in Feed.objects.all():
- print 'update', feed,
+ print '%s update %s ...' % (datetime.datetime.now(), feed),
try:
added = feed.read()
except:
print 'error'
else:
- print 'done (%d new items)' % added
+ if added == -1:
+ print 'postponed'
+ else:
+ print 'done (%d new items)' % added