-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I'm using repeat_every
as in
@app.on_event("startup")
@repeat_every(seconds=60)
def scrumbot_alert():
"""
Sends alert
"""
now_tz = datetime.datetime.utcnow().astimezone(pytz.timezone(timezone))
logging.error(now_tz)
alert()
But when I put a log to track when that function is run, I get 4 logs for every minute.
ERROR:root:2022-04-15 08:20:28.842180-07:00
ERROR:root:2022-04-15 08:20:30.325091-07:00
ERROR:root:2022-04-15 08:20:35.036041-07:00
ERROR:root:2022-04-15 08:20:35.333271-07:00
ERROR:root:2022-04-15 08:21:28.843411-07:00
ERROR:root:2022-04-15 08:21:30.326840-07:00
ERROR:root:2022-04-15 08:21:35.037719-07:00
ERROR:root:2022-04-15 08:21:35.334868-07:00
ERROR:root:2022-04-15 08:22:28.844427-07:00
ERROR:root:2022-04-15 08:22:30.333721-07:00
ERROR:root:2022-04-15 08:22:35.039823-07:00
ERROR:root:2022-04-15 08:22:35.337983-07:00
Expected behavior
Should see only one log per minute
Environment:
OS: Ubuntu 20.04
fastapi utils: 0.2.1
fastapi: 0.60.1
pydantic: 1.4
python: 3.8
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working