Timezone configuration, cron monitoring and backup debug information

This commit is contained in:
Eduardo Silva 2024-04-05 22:11:08 -03:00
parent c5307ee1ee
commit 0714eff28a
9 changed files with 97 additions and 8 deletions

View file

@ -8,6 +8,8 @@ import requests
def cron_check_updates(request):
webadmin_settings, webadmin_settings_created = WebadminSettings.objects.get_or_create(name='webadmin_settings')
webadmin_settings.cron_last_run = timezone.now()
webadmin_settings.save()
if webadmin_settings.last_checked is None or timezone.now() - webadmin_settings.last_checked > timezone.timedelta(
hours=1):