diff --git a/bots/zephyr_mirror_backend.py b/bots/zephyr_mirror_backend.py index 6af0785..90a73e4 100755 --- a/bots/zephyr_mirror_backend.py +++ b/bots/zephyr_mirror_backend.py @@ -680,6 +680,8 @@ returned the following warning: # just notify the user that they need to renew their tickets (code, stderr) = send_unauthed_zephyr(zwrite_args, wrapped_content) if code == 0: + if options.ignore_expired_tickets: + return return send_error_zulip("""%s Your last message was forwarded from Zulip to Zephyr unauthenticated, \ @@ -941,6 +943,9 @@ def parse_args(): parser.add_option('--sync-subscriptions', default=False, action='store_true') + parser.add_option('--ignore-expired-tickets', + default=False, + action='store_true') parser.add_option('--site', default=DEFAULT_SITE, help=optparse.SUPPRESS_HELP) diff --git a/bots/zmirror_private.conf.template b/bots/zmirror_private.conf.template index cb84e26..e1bf5d5 100644 --- a/bots/zmirror_private.conf.template +++ b/bots/zmirror_private.conf.template @@ -1,5 +1,5 @@ [program:zmirror-USERNAME] -command=python /home/humbug/humbug/bots/zephyr_mirror_backend.py --root-path=/home/humbug/humbug/bots --user=USERNAME --enable-log=/home/humbug/logs/mirror-log-%(program_name)s --use-sessions --session-path=/home/humbug/zephyr_sessions/%(program_name)s --api-key-file=/home/humbug/api-keys/%(program_name)s +command=python /home/humbug/humbug/bots/zephyr_mirror_backend.py --root-path=/home/humbug/humbug/bots --user=USERNAME --enable-log=/home/humbug/logs/mirror-log-%(program_name)s --use-sessions --session-path=/home/humbug/zephyr_sessions/%(program_name)s --api-key-file=/home/humbug/api-keys/%(program_name)s --ignore-expired-tickets priority=200 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected)