aboutsummaryrefslogtreecommitdiff
path: root/ppad.py
diff options
context:
space:
mode:
authorNao Ueda <nao.uedder@gmail.com>2020-11-02 20:59:43 +0900
committerNao Ueda <nao.uedder@gmail.com>2020-11-02 20:59:43 +0900
commit0f8a9964c397af38504532c11a148332da410784 (patch)
tree8347585262d5ed0ee4970df2b4f45b3c34eda4db /ppad.py
parentdcf3fa7be90ca2086b39fb4683ef6dc3421a7c45 (diff)
downloadppad-0f8a9964c397af38504532c11a148332da410784.tar.gz
ppad-0f8a9964c397af38504532c11a148332da410784.tar.bz2
ppad-0f8a9964c397af38504532c11a148332da410784.zip
use constant value
Diffstat (limited to 'ppad.py')
-rwxr-xr-xppad.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ppad.py b/ppad.py
index a4b50eb..338b37c 100755
--- a/ppad.py
+++ b/ppad.py
@@ -14,6 +14,7 @@ PAPERTRAIL_API_TOKEN = os.environ.get('PAPERTRAIL_API_TOKEN', None)
ARCHIVES_URL = 'https://papertrailapp.com/api/v1/archives.json'
DEFAULT_REMAIN_SIZE = 25
HEADERS = {'X-Papertrail-Token': PAPERTRAIL_API_TOKEN}
+MIN_INTERVAL_SEC = 0.1
def get_ppheader(response):
@@ -109,7 +110,7 @@ def main():
)
if len(future_list) < remain:
- time.sleep(0.2)
+ time.sleep(MIN_INTERVAL_SEC)
continue
for future in future_list:
@@ -127,7 +128,7 @@ def main():
remain = DEFAULT_REMAIN_SIZE
continue
- time.sleep(0.2)
+ time.sleep(MIN_INTERVAL_SEC)
if __name__ == "__main__":