Make range configurable

This commit is contained in:
Michal Čihař 2020-08-18 13:22:10 +02:00
parent 27251d7801
commit a6845330bc

View file

@ -32,7 +32,9 @@ TEMPLATE = """{
"zammad_secure": true, "zammad_secure": true,
"rt_url": "", "rt_url": "",
"rt_user": "", "rt_user": "",
"rt_pass": "" "rt_pass": "",
"rt_start": 1,
"rt_end": 1000
} }
""" """
@ -101,7 +103,7 @@ else:
if username not in users: if username not in users:
users[username] = source.get_user(username) users[username] = source.get_user(username)
for i in range(1, 1000): for i in range(config["rt_start"], config["rt_end"]):
print("Loading ticket {}".format(i)) print("Loading ticket {}".format(i))
ticket = source.get_ticket(i) ticket = source.get_ticket(i)
if ticket is None: if ticket is None: