Skip to content

Commit

Permalink
PM-1923 - Soft fail next epoch staking-ledger processing
Browse files Browse the repository at this point in the history
  • Loading branch information
kaozenn committed Aug 13, 2024
1 parent c776a14 commit 780556d
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@


class config:
api_enabled = os.environ.get("APP_MINA_PAYOUTS_DATA_PROVIDER_ENABLED", False).lower() == "true"
api_enabled = os.environ.get("APP_MINA_PAYOUTS_DATA_PROVIDER_ENABLED", "false" ).lower() == "true"
api_password = os.environ["APP_MINA_PAYOUTS_DATA_PROVIDER_PASSWORD"]
api_url = os.environ["APP_MINA_PAYOUTS_DATA_PROVIDER_URL"]
api_username = os.environ["APP_MINA_PAYOUTS_DATA_PROVIDER_USERNAME"]
mina_node_label = os.environ["APP_MINA_NODE_LABEL"]
network = os.environ["APP_NETWORK"]
s3_enabled = os.environ.get("APP_S3_ENABLED", False).lower() == "true"
s3_enabled = os.environ.get("APP_S3_ENABLED", "false" ).lower() == "true"
s3_bucket = os.environ["APP_S3_BUCKET"]
s3_subpath = os.environ.get("APP_S3_SUBPATH", "")
slack_webhook_info_url = os.environ["APP_SLACK_WEBHOOK_INFO_URL"]
Expand All @@ -40,7 +40,10 @@ def main():
logger.info(f" -- Processing current epoch ({current_epoch}) --")
process_staking_ledger(synced_pod, current_epoch, "staking-epoch-ledger")
logger.info(f" -- Processing next epoch ({next_epoch}) --")
process_staking_ledger(synced_pod, next_epoch, "next-epoch-ledger")
try:
process_staking_ledger(synced_pod, next_epoch, "next-epoch-ledger")
except Exception as e:
logger.warning(f"Unable to process the next epoch {next_epoch} due to error: {e}, skipping further processing.")

logger.info("Complete with success")

Expand Down

0 comments on commit 780556d

Please sign in to comment.