improve cron parsing

pull/268/head
Rui Carmo 2023-02-02 23:11:38 +00:00
rodzic 29264fa909
commit c455991f0e
1 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -284,10 +284,11 @@ def parse_procfile(filename):
# Check for cron patterns
if kind == "cron":
limits = [59, 24, 31, 12, 7]
matches = match(CRON_REGEXP, command).groups()
if matches:
res = match(CRON_REGEXP, command)
if res:
matches = res.groups()
for i in range(len(limits)):
if int(matches[i + 1].replace("*/", "").replace("*", "1")) > limits[i]:
if int(matches[i].replace("*/", "").replace("*", "1")) > limits[i]:
raise ValueError
workers[kind] = command
except Exception: