Skip to content

Commit

Permalink
DBC22-1593: events feed now continues on failed updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-oxd committed Jan 18, 2024
1 parent 292a587 commit 0e4beac
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/backend/apps/event/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,18 @@ def populate_all_event_data():

active_event_ids = []
for event_data in feed_data:
id = event_data.get("id", "").split("/")[-1]
event_data["closed"] = closures.get(id, False)
try:
id = event_data.get("id", "").split("/")[-1]
event_data["closed"] = closures.get(id, False)

populate_event_from_data(event_data)
populate_event_from_data(event_data)

# Event is active
if "id" in event_data:
active_event_ids.append(event_data["id"])
# Event is active
if "id" in event_data:
active_event_ids.append(event_data["id"])

except Exception as e:
logger.warning(e)

# Mark events absent in the feed as inactive
Event.objects.filter(status=EVENT_STATUS.ACTIVE)\
Expand Down

0 comments on commit 0e4beac

Please sign in to comment.