relaycorp / veraid-authority

Cloud-native app that allows organisations to manage their VeraId members and the issuance of their respective bundles.
https://docs.relaycorp.tech/veraid-authority/
GNU Affero General Public License v3.0
0 stars 0 forks source link

Implement member bundle request scheduler #107

Closed gnarea closed 1 year ago

gnarea commented 1 year ago

I already implemented the scaffolding around this in https://github.com/relaycorp/veraid-authority/blob/1ca6f08f5cf18480f969eb7253b5d988f3fd6c8b/src/backgroundQueue/sinks/memberBundleRequestTrigger.sink.ts

We just need to update that file with the actual business logic:

  1. Find all the member bundle requests in the database with an start date in the next 3 days.
  2. Fire the net.veraid.authority.member-bundle-request event for each record and then delete the DB record. Make sure to use the MemberBundleRequest.id as the CloudEvent id, to allow the broker to dedupe events.

Keep in mind that this can be tested with skaffold dev: That sink is triggered every minute.

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 1.13.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: