diff options
author | Nao Ueda <nao.uedder@gmail.com> | 2020-11-02 20:59:43 +0900 |
---|---|---|
committer | Nao Ueda <nao.uedder@gmail.com> | 2020-11-02 20:59:43 +0900 |
commit | 0f8a9964c397af38504532c11a148332da410784 (patch) | |
tree | 8347585262d5ed0ee4970df2b4f45b3c34eda4db /ppad.py | |
parent | dcf3fa7be90ca2086b39fb4683ef6dc3421a7c45 (diff) | |
download | ppad-0f8a9964c397af38504532c11a148332da410784.tar.gz ppad-0f8a9964c397af38504532c11a148332da410784.tar.bz2 ppad-0f8a9964c397af38504532c11a148332da410784.zip |
use constant value
Diffstat (limited to 'ppad.py')
-rwxr-xr-x | ppad.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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__": |