Skip to content

Commit

Permalink
Add TODO's
Browse files Browse the repository at this point in the history
  • Loading branch information
KiOui committed Sep 18, 2023
1 parent 2d19fc6 commit 582cc2f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions website/age/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def update_is_over_18(sender, **kwargs):
return

attributes = kwargs.get("attributes")
# TODO: How to verify proven attributes with requested attributes?
for attribute_conjuction_clause in attributes:
for attribute_disjunction_clause in attribute_conjuction_clause:
attribute_id = attribute_disjunction_clause["id"]
Expand Down
2 changes: 2 additions & 0 deletions website/tosti/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,10 @@
"thaliedje.crons.StopMusicCronJob",
"thaliedje.crons.StartMusicCronJob",
"silvasoft.crons.SynchronizeSilvasoft",
"yivi.crons.CleanupSessionCronJob",
]

DJANGO_CRON_DELETE_LOGS_OLDER_THAN = 14

# TODO: We might rather place [[["irma-demo.MijnOverheid.ageLower.over18"]]] here and create a function that can verify the requested attribute combination below with the proven attributes in age/signals.py
AGE_VERIFICATION_DISCLOSE_ATTRIBUTE = "irma-demo.MijnOverheid.ageLower.over18"
17 changes: 17 additions & 0 deletions website/yivi/crons.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from django_cron import CronJobBase, Schedule


class CleanupSessionCronJob(CronJobBase):
"""Cronjob to clean up old Yivi sessions."""

RUN_EVERY_MINS = 60 * 24
RETRY_AFTER_FAILURE_MINS = 30
schedule = Schedule(
run_every_mins=RUN_EVERY_MINS, retry_after_failure_mins=RETRY_AFTER_FAILURE_MINS, run_on_days=WEEKDAYS
)
code = "yivi.cleanupsessions"

def do(self):
"""Cleanup sessions."""
# TODO: write this
pass

0 comments on commit 582cc2f

Please sign in to comment.