Skip to content

Commit

Permalink
Add bunch of logging to get_activity
Browse files Browse the repository at this point in the history
  • Loading branch information
emlowe committed Oct 30, 2023
1 parent 966ab8e commit c2d483b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/api/v1/activities.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,17 @@ async def get_activity(
)
return schemas.ActivitiesResponse()

logger.warning(f"Got {len(activities)} activities from activities table.")
activities_with_cw: List[schemas.ActivityWithCW] = []
for activity in activities:
unit: Dict = units.get(activity.asset_id).copy()
logger.warning(f"Checking activity: {activity}")
unit = units.get(activity.asset_id)
if unit is None:
continue
unit = unit.copy()
logger.warning(f"Found matching unit: {unit}")
token = unit.pop("token", None)
logger.warning(f"Got token: {token}")
org = unit.pop("organization", None)
project = unit.pop("project", None)

Expand Down

0 comments on commit c2d483b

Please sign in to comment.