0
0
Fork 0
mirror of https://github.com/healthchecks/healthchecks.git synced 2025-04-07 22:25:35 +00:00

Upgrade to cronsim 2.4

This commit is contained in:
Pēteris Caune 2023-04-26 18:18:31 +03:00
parent 9ead449d90
commit 9ddae08437
No known key found for this signature in database
GPG key ID: E28D7679E9A9EDE2
3 changed files with 4 additions and 14 deletions

View file

@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
### Improvements
- Switch from CssAbsoluteFilter to CssRelativeFilter (#822)
- Add statsd metric collection in hc.lib.s3.get_object()
- Upgrade to cronsim 2.4
## v2.8.1 - 2023-04-11

View file

@ -13,7 +13,6 @@ from secrets import token_urlsafe
from urllib.parse import urlencode, urlparse
from uuid import UUID
from cron_descriptor import ExpressionDescriptor
from cronsim import CronSim, CronSimError
from django.conf import settings
from django.contrib import messages
@ -596,19 +595,10 @@ def cron_preview(request):
it = CronSim(schedule, now_local)
for i in range(0, 6):
ctx["dates"].append(next(it))
ctx["desc"] = it.explain()
except (CronSimError, StopIteration):
ctx["bad_schedule"] = True
if ctx["dates"]:
try:
descriptor = ExpressionDescriptor(schedule, use_24hour_time_format=True)
ctx["desc"] = descriptor.get_description()
except:
# We assume the schedule is valid if cronsim accepts it.
# If cron-descriptor throws an exception, don't show the description
# to the user.
pass
return render(request, "front/cron_preview.html", ctx)

View file

@ -1,8 +1,7 @@
cron-descriptor==1.2.35
cronsim==2.3
cronsim==2.4
Django==4.2
django-compressor==4.3.1
fido2==1.1.0
fido2==1.1.1
psycopg2==2.9.6
pycurl==7.45.2
pyotp==2.8.0