Skip to content

Commit

Permalink
Merge pull request #17 from City-of-Helsinki/feature/add-device-id-to…
Browse files Browse the repository at this point in the history
…-kafka-raw-data

add extracted device id to kafka raw data topic
  • Loading branch information
sheenacodes authored Oct 17, 2023
2 parents e71bd8f + 5693562 commit 1fe8d90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ async def api_v2(request: Request, endpoint: dict) -> Response:
)
response_message = str(response_message)
print("REMOVE ME", auth_ok, device_id, topic_name, response_message, status_code)
# add extracted device id to request data before pushing to kafka raw data topic
request_data["device_id"] = device_id
# We assume device data is valid here
logging.debug(pprint.pformat(request_data))
if auth_ok and topic_name:
Expand Down
1 change: 0 additions & 1 deletion tests/test_api2.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import logging
import os
from datetime import datetime, timedelta, timezone

import httpx

logging.basicConfig(level=logging.INFO)
Expand Down

0 comments on commit 1fe8d90

Please sign in to comment.