Skip to content

Commit

Permalink
add date field to PlanDownload event
Browse files Browse the repository at this point in the history
  • Loading branch information
Belissimo-T committed Nov 22, 2023
1 parent 04c8cfc commit 8dda9e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions backend/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def get_base_dict(self):
@dataclasses.dataclass
class PlanDownload(Event):
plan_type: str # Ex: "PlanKl.xml" or "VPlanKl.xml"
date: datetime.date
last_modified: datetime.datetime
file_length: int

Expand Down
2 changes: 1 addition & 1 deletion backend/plan_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ async def download_indiware_mobil(
)

await timer.submit_async(plan_type=plan_filename, last_modified=plan_response.last_modified,
file_length=len(plan_response.content))
file_length=len(plan_response.content), date=date)

self.cache.store_plan_file(date, revision, plan_response.content, plan_filename)
self.cache.store_plan_file(date, revision, json.dumps(downloaded_file.serialize()),
Expand Down

0 comments on commit 8dda9e0

Please sign in to comment.