]> andersk Git - jira-zephyrbot.git/blobdiff - jirabot.py
Decrease interval to 20 seconds.
[jira-zephyrbot.git] / jirabot.py
index 2fee41dd45cbc2e9637005ff554d51ca8aeff4c5..5495e5af5bc5ed8b3963e1418e36927ac93cecef 100755 (executable)
@@ -122,6 +122,8 @@ def zerror(msg):
 b = jira_init()
 zephyr.init()
 
+count = 0
+
 while True:
     time_file_new = time_file + '.' + ''.join(random.sample(string.letters, 8))
 
@@ -132,11 +134,17 @@ while True:
         time.sleep(17)
         continue
 
+    if (count >= 200):
+        b = jira_init()
+        count = 0
+    count += 1
+
     jira_login(b)
     b.open("https://jira.mit.edu/jira/sr/jira.issueviews:searchrequest-rss/temp/SearchRequest.xml?&pid=10185&updated%3Aprevious=-1w&sorter/field=updated&sorter/order=DESC&tempMax=1000")
     issues_rss = b.response().read()
     b.open("https://jira.mit.edu/jira/sr/jira.issueviews:searchrequest-comments-rss/temp/SearchRequest.xml?&pid=10185&updated%3Aprevious=-1w&sorter/field=updated&sorter/order=DESC&tempMax=1000")
     comments_rss = b.response().read()
+    b.clear_history()
 
     old_time = int(open(time_file_new).read())
     new_time = old_time
@@ -150,4 +158,4 @@ while True:
     open(time_file_new, 'w').write(str(new_time))
     os.rename(time_file_new, time_file)
 
-    time.sleep(60)
+    time.sleep(20)
This page took 0.058191 seconds and 4 git commands to generate.