Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Award badge CRON job #120

Open
3 tasks
rubenhorn opened this issue Apr 2, 2022 · 1 comment
Open
3 tasks

Award badge CRON job #120

rubenhorn opened this issue Apr 2, 2022 · 1 comment
Assignees

Comments

@rubenhorn
Copy link
Collaborator

rubenhorn commented Apr 2, 2022

  • Schedule lambda to run once per day
  • Query relevant crowdactions
  • If they have ended in the past 24h 👉invoke processing lambda asynchronously

Processing lambda:

  1. Load crowdaction details (badge thresholds as implemented in Crowdaction badge threshold #111 )
  2. Load paricipations for that crowdaction (shared code with Participants/participations #65?)
  3. Foreach participation:
    a. Compute badge
    b. Add badge to user profile (⚠ Must be atomic operation)
This was referenced Apr 2, 2022
@edreinoso edreinoso self-assigned this Apr 18, 2022
@edreinoso
Copy link
Contributor

edreinoso commented Apr 18, 2022

date_end will be used to determine when a crowdaction should be closing.

It is really important to know the data type of the date_end. Currently it's only a string in DynamoDB, but this could change depending on the frontend implementation.

Event bridge will be used to put a rule in the event bus that will be triggered based on the crowdaction date end. This will invoke another lambda function that will do the point calculation, and therefore the badge awarding

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants