Skip to content

Commit

Permalink
fix: added misgrace to giveaway jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Destinea committed Dec 15, 2024
1 parent 9f72341 commit 4d5c2ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bot/giveaway/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ async def schedule_giveaways(db_client, producer, scheduler):
run_date=giveaway["start_time"],
args=[producer, "giveaway_start", giveaway], # Call Kafka producer
id=f"start-{giveaway['_id']}",
misfire_grace_time=60, # 1 minute grace period
)
# Update database status
await db_client.giveaways.update_one(
Expand All @@ -53,6 +54,7 @@ async def schedule_giveaways(db_client, producer, scheduler):
run_date=giveaway["end_time"],
args=[producer, "giveaway_end", giveaway], # Call Kafka producer
id=f"end-{giveaway['_id']}",
misfire_grace_time=60, # 1 minute grace period
)
# Update database status
await db_client.giveaways.update_one(
Expand Down

0 comments on commit 4d5c2ac

Please sign in to comment.