-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow specifying calibnet and/or mainnet snapshot for the daily… #438
Conversation
… snapshot Signed-off-by: samuelarogbonlo <[email protected]>
Forest: snapshot-service-2 Infrastructure Plan: successShow Plan
|
Forest: snapshot-service Infrastructure Plan: successShow Plan
|
Signed-off-by: samuelarogbonlo <[email protected]>
Signed-off-by: samuelarogbonlo <[email protected]>
Signed-off-by: samuelarogbonlo <[email protected]>
Signed-off-by: samuelarogbonlo <[email protected]>
Signed-off-by: samuelarogbonlo <[email protected]>
Signed-off-by: samuelarogbonlo <[email protected]>
Signed-off-by: samuelarogbonlo <[email protected]>
Signed-off-by: samuelarogbonlo <[email protected]>
ping @LesnyRumcajs |
default = ["mainnet", "calibnet"] | ||
|
||
validation { | ||
condition = alltrue([for val in var.snapshot_type : contains(["mainnet", "calibnet"], val)]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also check that the list is not empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LesnyRumcajs. done, please re-approve.
echo "$SNAPSHOT_TYPE" | ||
|
||
# Setup cron job | ||
IFS=',' read -ra ADDR <<< "$SNAPSHOT_TYPE" | ||
for type in "${ADDR[@]}"; do | ||
case "$type" in | ||
mainnet) | ||
mv mainnet_cron_job /etc/cron.hourly/ | ||
;; | ||
calibnet) | ||
mv calibnet_cron_job /etc/cron.hourly/ | ||
;; | ||
*) | ||
echo "Error: Invalid network type '$type'" | ||
;; | ||
esac | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be a follow-up, but we can generate the cron scripts now, instead of copying pre-defined ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure sure.
Signed-off-by: samuelarogbonlo <[email protected]>
Signed-off-by: samuelarogbonlo <[email protected]>
Forest snapshot service discontinued in favour of the infra snapshot service. |
Summary of changes
Changes introduced in this pull request:
Reference issue to close (if applicable)
Closes #376
Other information and links