Commit f6176dd53b379bdcdfae699225d4e129f63a29c7
1 parent
66c0728bbf
Exists in
master
sleep 60 if not pull
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
main.py
... | ... | @@ -499,11 +499,11 @@ def pull(modem): |
499 | 499 | global MIN_SIGNAL_STRENGTH |
500 | 500 | |
501 | 501 | if not PRODUCTS: |
502 | + sleep(60) | |
502 | 503 | return |
503 | 504 | |
504 | 505 | signalStrength = modem.signalStrength |
505 | 506 | if signalStrength < MIN_SIGNAL_STRENGTH: |
506 | - #logger.warn('Signal strength {0} < {1}, skipping pull'.format(signalStrength, MIN_SIGNAL_STRENGTH)) | |
507 | 507 | return |
508 | 508 | |
509 | 509 | pull_per_minute = 60 / PULL_INTERVAL |
... | ... | @@ -520,6 +520,7 @@ def pull(modem): |
520 | 520 | return |
521 | 521 | |
522 | 522 | if not isPullEnable(): |
523 | + sleep(60) | |
523 | 524 | return |
524 | 525 | |
525 | 526 | r = None |