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:
parent
9ead449d90
commit
9ddae08437
3 changed files with 4 additions and 14 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue