diff options
| author | jason | 2016-08-18 13:15:59 -0600 |
|---|---|---|
| committer | jason | 2016-08-18 13:15:59 -0600 |
| commit | 5e43eca28650a762d7f889382ee833a458b380cc (patch) | |
| tree | 9916f368e53a6532300b3129e3f052a57a82bd46 | |
| parent | bf46440877e8b2cdbc5878194c79e456dceae353 (diff) | |
| download | warmachine-ng-5e43eca28650a762d7f889382ee833a458b380cc.tar.gz warmachine-ng-5e43eca28650a762d7f889382ee833a458b380cc.zip | |
probably fix a bug with scheduling standup times over weekends
| -rw-r--r-- | warmachine/addons/standup.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/warmachine/addons/standup.py b/warmachine/addons/standup.py index ef873d3..c8e4083 100644 --- a/warmachine/addons/standup.py +++ b/warmachine/addons/standup.py | |||
| @@ -346,16 +346,16 @@ class StandUpPlugin(WarMachinePlugin): | |||
| 346 | next_standup = datetime(now.year, now.month, now.day, | 346 | next_standup = datetime(now.year, now.month, now.day, |
| 347 | standup_hour, standup_minute) | 347 | standup_hour, standup_minute) |
| 348 | 348 | ||
| 349 | # If we've already past the time for today, schedule it for that time on the | 349 | # If we've already past the time for today, schedule it for that time |
| 350 | # next weekday | 350 | # on the next weekday |
| 351 | if now > next_standup: | 351 | if now > next_standup or now.isoweekday() > 4: |
| 352 | # if it's friday, wait 72 hours | 352 | # if it's friday(5), wait 72 hours |
| 353 | if now.isoweekday() == 5: | 353 | if now.isoweekday() == 5: |
| 354 | hours = 72 | 354 | hours = 72 |
| 355 | # if it's saturday, wait 48 | 355 | # if it's saturday(6), wait 48 |
| 356 | elif now.isoweekday() == 6: | 356 | elif now.isoweekday() == 6: |
| 357 | hours = 48 | 357 | hours = 48 |
| 358 | # if it's sunday-thur wait 24 | 358 | # if it's sunday(7)-thur(4) wait 24 |
| 359 | else: | 359 | else: |
| 360 | hours = 24 | 360 | hours = 24 |
| 361 | 361 | ||