Skip to content

Commit

Permalink
Fix for holdoff threshold checks (#7795)
Browse files Browse the repository at this point in the history
- Don't use the "day" portion of date?
  • Loading branch information
SchrodingersGat authored Aug 2, 2024
1 parent 6f67fb2 commit 6fd5a99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/InvenTree/InvenTree/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def check_daily_holdoff(task_name: str, n_days: int = 1) -> bool:
if last_success:
threshold = datetime.now() - timedelta(days=n_days)

if last_success > threshold:
if last_success.date() > threshold.date():
logger.info(
"Last successful run for '%s' was too recent - skipping task", task_name
)
Expand Down

0 comments on commit 6fd5a99

Please sign in to comment.