Reduce lifetime of export files

This commit is contained in:
Raphael Michel
2020-12-18 19:00:00 +01:00
parent 53c71669b9
commit 20dbb3dfd0
3 changed files with 3 additions and 3 deletions

View File

@@ -83,7 +83,7 @@ class ExportersMixin:
cf = CachedFile(web_download=False)
cf.date = now()
cf.expires = now() + timedelta(days=3)
cf.expires = now() + timedelta(hours=24)
cf.save()
d = serializer.data
for k, v in d.items():

View File

@@ -2047,7 +2047,7 @@ class ExportDoView(EventPermissionRequiredMixin, ExportMixin, AsyncAction, View)
cf = CachedFile(web_download=True, session_key=request.session.session_key)
cf.date = now()
cf.expires = now() + timedelta(days=3)
cf.expires = now() + timedelta(hours=24)
cf.save()
return self.do(self.request.event.id, str(cf.id), self.exporter.identifier, self.exporter.form.cleaned_data)

View File

@@ -1247,7 +1247,7 @@ class ExportDoView(OrganizerPermissionRequiredMixin, ExportMixin, AsyncAction, V
cf = CachedFile(web_download=True, session_key=request.session.session_key)
cf.date = now()
cf.expires = now() + timedelta(days=3)
cf.expires = now() + timedelta(hours=24)
cf.save()
return self.do(
organizer=self.request.organizer.id,