summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-30 00:41:30 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-30 00:41:30 +0200
commit4c728e789f50510f07822e61633a8b3c383daf12 (patch)
tree4ad8da716c7422e5de9d388b4c230ab63b5fc21c /bin
parent57bccbf06abb34aa8c94d3c59aa480749d2b9388 (diff)
bump py api url
Diffstat (limited to 'bin')
-rw-r--r--bin/updater.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/updater.py b/bin/updater.py
index 2942d9a2b..6fc6cee1c 100644
--- a/bin/updater.py
+++ b/bin/updater.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
"""
Updater script for the news app which allows multiple feeds to be updated at
-once to speed up the update process. Built in cron has to be disabled in the
+once to speed up the update process. Built in cron has to be disabled in the
news config, see the README.rst file in the top directory for more information.
"""
@@ -21,7 +21,7 @@ import urllib
def check_status_code(response):
if response.status_code != 200:
- raise Exception('Request failed with %i: %s' % (response.status_code,
+ raise Exception('Request failed with %i: %s' % (response.status_code,
response.text))
class UpdateThread(threading.Thread):
@@ -66,7 +66,7 @@ class UpdateThread(threading.Thread):
class Updater:
- def __init__(self, base_url, thread_num, interval, user, password, timeout,
+ def __init__(self, base_url, thread_num, interval, user, password, timeout,
run_once):
self.thread_num = thread_num
self.interval = interval
@@ -78,7 +78,7 @@ class Updater:
if self.base_url[-1] != '/':
self.base_url += '/'
- self.base_url += 'index.php/apps/news/api/v1-2'
+ self.base_url += 'index.php/apps/news/api/v1-4'
self.before_cleanup_url = '%s/cleanup/before-update' % self.base_url
self.after_cleanup_url = '%s/cleanup/after-update' % self.base_url
@@ -117,7 +117,7 @@ class Updater:
if self.run_once:
return
-
+
# wait until the interval finished to run again
time.sleep(self.interval)