cds-snc / covid-alert-server

Exposure Notification: Diagnosis Server implementation / Notification d’exposition : Mise en œuvre du serveur de diagnostic
Apache License 2.0
298 stars 31 forks source link

refactor(workers): Refactors location of worker code to add more workers #272

Closed maxneuvians closed 4 years ago

maxneuvians commented 4 years ago

Description of what your PR accomplishes:

This is a small refactor of the code that moves the expiration worker from its own expiration directory to a workers directory. This would allow us to add additional worker instances and keep the organized. For example we may want a stats aggregator worker that runs every sixty minutes vs the thirty seconds that the current expiration worked is running on.

Why this approach? Any notable design decisions?

We could have included each worker in their own subdirectory, however, there is some shared code we us per worker, ex the worker struct. It would probably make sense to share that code.

Anything the reviewers should focus on? Any discussion points?

Alternative implementations.