This commit is contained in:
parent
3afa6d7260
commit
1f0bf5bad3
@ -2,3 +2,5 @@ aio-pika
|
||||
sentry-sdk
|
||||
aioinflux
|
||||
requests
|
||||
tzdata
|
||||
tzlocal
|
@ -17,6 +17,7 @@ import sentry_sdk
|
||||
from aioinflux import InfluxDBClient
|
||||
import config
|
||||
import requests
|
||||
import tzlocal
|
||||
|
||||
if config.SENTRY_DSN:
|
||||
sentry_sdk.init(
|
||||
@ -33,7 +34,7 @@ async def on_message(message: IncomingMessage):
|
||||
Here it is to show that it's possible.
|
||||
"""
|
||||
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.raise_for_status()
|
||||
|
Loading…
Reference in New Issue
Block a user