This commit is contained in:
parent
3afa6d7260
commit
1f0bf5bad3
@ -2,3 +2,5 @@ aio-pika
|
|||||||
sentry-sdk
|
sentry-sdk
|
||||||
aioinflux
|
aioinflux
|
||||||
requests
|
requests
|
||||||
|
tzdata
|
||||||
|
tzlocal
|
@ -17,6 +17,7 @@ import sentry_sdk
|
|||||||
from aioinflux import InfluxDBClient
|
from aioinflux import InfluxDBClient
|
||||||
import config
|
import config
|
||||||
import requests
|
import requests
|
||||||
|
import tzlocal
|
||||||
|
|
||||||
if config.SENTRY_DSN:
|
if config.SENTRY_DSN:
|
||||||
sentry_sdk.init(
|
sentry_sdk.init(
|
||||||
@ -33,7 +34,7 @@ async def on_message(message: IncomingMessage):
|
|||||||
Here it is to show that it's possible.
|
Here it is to show that it's possible.
|
||||||
"""
|
"""
|
||||||
msg_json = json.loads(message.body)
|
msg_json = json.loads(message.body)
|
||||||
now = datetime.now()
|
now = datetime.now(tz=tzlocal.get_localzone())
|
||||||
|
|
||||||
r = requests.get(f"http://input-service/sample/{msg_json['tag']}")
|
r = requests.get(f"http://input-service/sample/{msg_json['tag']}")
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
|
Loading…
Reference in New Issue
Block a user