Better today calculation, corrected schedule
This commit is contained in:
2
.github/workflows/last-pull.yml
vendored
2
.github/workflows/last-pull.yml
vendored
@@ -2,7 +2,7 @@ name: Last Pull for Yesterday
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 2 * * *'
|
- cron: '0 10 * * *'
|
||||||
env:
|
env:
|
||||||
TWITTER_TOKEN: ${{ secrets.TWITTER_TOKEN }}
|
TWITTER_TOKEN: ${{ secrets.TWITTER_TOKEN }}
|
||||||
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
|
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
|
||||||
|
|||||||
2
.github/workflows/update.yml
vendored
2
.github/workflows/update.yml
vendored
@@ -2,7 +2,7 @@ name: Update Scores
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 4,8,10,16,18 * * *'
|
- cron: '0 15,19,20,1,4 * * *'
|
||||||
env:
|
env:
|
||||||
TWITTER_TOKEN: ${{ secrets.TWITTER_TOKEN }}
|
TWITTER_TOKEN: ${{ secrets.TWITTER_TOKEN }}
|
||||||
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
|
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
|
||||||
|
|||||||
@@ -44,4 +44,11 @@ class WordleDay:
|
|||||||
return self.wordle_no == other.wordle_no
|
return self.wordle_no == other.wordle_no
|
||||||
|
|
||||||
|
|
||||||
WORDLE_TODAY = WordleDay.from_date(datetime.date.today())
|
# Designed so that "today" will be the current date in CST
|
||||||
|
# Regardless of where the code is run
|
||||||
|
today = (
|
||||||
|
datetime.datetime.now(datetime.timezone.utc)
|
||||||
|
.astimezone(datetime.timezone(datetime.timedelta(hours=-5), name="US Central"))
|
||||||
|
.date()
|
||||||
|
)
|
||||||
|
WORDLE_TODAY = WordleDay.from_date(today)
|
||||||
|
|||||||
Reference in New Issue
Block a user