Wed, 12 Nov 2014 14:22:30 +0200
- slight rework on bt poll
bt.py | file | annotate | diff | comparison | revisions | |
mod_bt.py | file | annotate | diff | comparison | revisions |
--- a/bt.py Mon Nov 10 17:49:20 2014 +0200 +++ b/bt.py Wed Nov 12 14:22:30 2014 +0200 @@ -104,6 +104,7 @@ user, password = credentials() newid = suds_client.service.mc_issue_get_biggest_id (user, password, 0) except Exception as e: + Irc.broadcast ("Error while polling: %s" % e) pass while newid > btannounce_id:
--- a/mod_bt.py Mon Nov 10 17:49:20 2014 +0200 +++ b/mod_bt.py Wed Nov 12 14:22:30 2014 +0200 @@ -13,7 +13,14 @@ { 'name': 'testannounce', 'description': 'Tests the ticket announcer', - 'args': '<recipient> <message...>', + 'args': '<ticket>', + 'level': 'admin', + }, + + { + 'name': 'checkbt', + 'description': 'Polls the bug tracker for new tickets', + 'args': None, 'level': 'admin', }, ] @@ -23,4 +30,7 @@ Bt.get_ticket_data (bot, replyto, args['ticket'], True) def cmd_testannounce (bot, args, **rest): - Bt.announce_new_issue (bot, Bt.get_issue (args['ticket'])) \ No newline at end of file + Bt.announce_new_issue (bot, Bt.get_issue (args['ticket'])) + +def cmd_checkbt (bot, **rest): + Bt.poll() \ No newline at end of file