covid19cz/erouska-backend

EFGS: postpone subsequent batches for download

Closed this issue · 1 comments

When downloading keys from EFGS, batches are chained and after downloading some, one has the name of the following. Because the timeout of Cloud Functions is very limited, it's necessary to postpone the delay by publishing a proper pubsub message which will invoke download of the next batch.

Better solution: download every two hours, having a tag of an expected batch. Once that batch is downloaded, push its data (split to batches) to PubSub which will trigger push of these keys to the Key Server. Once a batch with a tag is downloaded, the name of the subsequent batch can be guessed and saved somewhere.