Skip to content

Commit

Permalink
Seems like logfire is still too much
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryTraill committed Nov 18, 2024
1 parent 39d38ca commit 847d116
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
web: uvicorn chronos.main:app --host=0.0.0.0 --port=${PORT:-5000}
worker: celery -A chronos.worker worker --loglevel=info --concurrency 2 -E
worker: celery -A chronos.worker worker --loglevel=error --concurrency 2 -E
6 changes: 3 additions & 3 deletions chronos/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,8 @@ async def delete_old_logs_job():
if cache.get(DELETE_JOBS_KEY):
return
else:
await cache.set(DELETE_JOBS_KEY, 'True', ex=1200)
with logfire.span('Starting to delete old logs'):
_delete_old_logs_job.delay()
cache.set(DELETE_JOBS_KEY, 'True', ex=1200)
_delete_old_logs_job.delay()


def get_count(date_to_delete_before: datetime) -> int:
Expand All @@ -228,6 +227,7 @@ def get_count(date_to_delete_before: datetime) -> int:


@celery_app.task
@logfire.no_auto_trace
def _delete_old_logs_job():
# with logfire.span('Started to delete old logs'):
with Session(engine) as db:
Expand Down

0 comments on commit 847d116

Please sign in to comment.