Skip to content

Commit

Permalink
Merge pull request #107 from orangespaceman/lm/dont-do-anything-if-no…
Browse files Browse the repository at this point in the history
…t-wednesday

Don't do anything if not Wednesday
  • Loading branch information
lachiemurray authored Sep 5, 2024
2 parents 79e9aee + b6fe2a0 commit 214d53f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions phx/results/jobs/hourly/update_performances.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ class Job(HourlyJob):

def execute(self):
now = datetime.now()

# Don't do anything if it's not Wednesday
if now.weekday() != 2:
logger.info("Not Wednesday, job not running")
return

fraction_to_check = fraction_to_check = self.fraction_to_check(now)

last_month = now - timedelta(days=30)
Expand Down

0 comments on commit 214d53f

Please sign in to comment.