Skip to content

Commit 0a4104f

Browse files
committed
add logging message to explain why rows are being removed
1 parent bceb261 commit 0a4104f

File tree

2 files changed

+9
-1
lines changed
  • apps/openchallenges/data-lambda

2 files changed

+9
-1
lines changed

apps/openchallenges/data-lambda/openchallenges_data_lambda/app.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,21 @@ def lambda_handler(event, context) -> dict:
128128
)
129129

130130
if rows_to_remove_from_challenge_service:
131+
logging.warning(
132+
f"Mismatch found in the `challenge_contribution` tables; removing extra rows from "
133+
"the `challenge_service` database"
134+
)
131135
conn = db_utils.connect_to_db()
132136
db_utils.delete_rows_by_id(
133137
conn, "challenge_contribution", rows_to_remove_from_challenge_service
134138
)
135139
conn.close()
136140

137141
if rows_to_remove_from_organization_service:
142+
logging.warning(
143+
f"Mismatch found in the `challenge_contribution` tables; removing extra rows from "
144+
"the `organization_service` database"
145+
)
138146
conn = db_utils.connect_to_db("organization_service")
139147
db_utils.delete_rows_by_id(
140148
conn, "challenge_contribution", rows_to_remove_from_organization_service

apps/openchallenges/data-lambda/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)