-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(warmup)!: Add warmup wait command (#379)
This allows to programmatically (with script) wait for elements to be ready, instead of hardcoding a duration. <details><summary>Scripts examples</summary> Warm-up: ```bash KEY="data/${1:0:2}/$1"; if [ "$(aws s3api head-object --bucket cold --key "$KEY" --query StorageClass)" == '"GLACIER"' ] then aws s3api restore-object --restore-request Days=7 --bucket cold --key "$KEY" fi ``` Warm-up wait: ```bash KEY="data/${1:0:2}/$1"; until [ "$(aws s3api head-object --bucket cold --key "$KEY" --query StorageClass)" != '"GLACIER"' ] do sleep 60s done ``` </details> This is a simple version that will wait for each object sequentially (but that shouldn't be a problem as all warm up request are done in a first pass, and thus runs in parallel). I'm up for discussion if another model looks good, like - moving the loop in the lib, and the `wait` script just check if the file is ready - having only one script, that warm-up and then return the status --------- Signed-off-by: MATILLAT Quentin <qmatillat@gmail.com>
- Loading branch information
Showing
2 changed files
with
33 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters