From 7662693ee62addd08c5f6c0cc0580b88be56eba4 Mon Sep 17 00:00:00 2001 From: Scitz0 Date: Mon, 25 Mar 2024 21:04:30 +0100 Subject: [PATCH] fix cron job --- files/grest/cron/jobs/cli_protocol_params-update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/grest/cron/jobs/cli_protocol_params-update.sh b/files/grest/cron/jobs/cli_protocol_params-update.sh index dbddabe2..dbc20b70 100755 --- a/files/grest/cron/jobs/cli_protocol_params-update.sh +++ b/files/grest/cron/jobs/cli_protocol_params-update.sh @@ -30,6 +30,6 @@ elif [[ -z "${prot_params}" ]] || ! jq -er . <<< "${prot_params}" &>/dev/null; t exit 1 fi -psql ${DB_NAME} -qb -c "INSERT INTO grest.control_table (key, last_value, artifacts) VALUES ('cli_protocol_params','${last_epoch}','${prot_params}') ON CONFLICT(key) DO UPDATE SET last_value='${last_epoch}', artifacts='${prot_params}'" +psql ${DB_NAME} -qb -c "INSERT INTO grest.control_table (key, last_value, artifacts) VALUES ('cli_protocol_params','${current_epoch}','${prot_params}') ON CONFLICT(key) DO UPDATE SET last_value='${current_epoch}', artifacts='${prot_params}'" -echo "$(date +%F_%H:%M:%S) - END - CLI Protocol Parameters Update, updated for epoch ${last_epoch}." +echo "$(date +%F_%H:%M:%S) - END - CLI Protocol Parameters Update, updated for epoch ${current_epoch}."