|
34 | 34 | from .constants import get_base_url
|
35 | 35 | from .constants import get_base_http_url
|
36 | 36 | from .constants import GITHUB_OAUTH_START
|
37 |
| -from .constants import ONE_YEAR_IN_SECONDS |
| 37 | +from .constants import THREADING_TIMEOUT_MAX |
38 | 38 | from .constants import LOOPBACK
|
39 | 39 |
|
40 | 40 |
|
@@ -231,18 +231,18 @@ def manual_entry():
|
231 | 231 | # user's browser to prevent a race condition where the Hyperdash server
|
232 | 232 | # redirects with an access token but the Python server isn't ready yet.
|
233 | 233 | #
|
234 |
| - # Also, we set the timeout to ONE_YEAR_IN_SECONDS because without a timeout, |
| 234 | + # Also, we set the timeout to THREADING_TIMEOUT_MAX because without a timeout, |
235 | 235 | # the .get() call on the queue can not be interrupted with CTRL+C.
|
236 |
| - server_started_queue.get(block=True, timeout=ONE_YEAR_IN_SECONDS) |
237 |
| - manual_entry_thread_started_queue.get(block=True, timeout=ONE_YEAR_IN_SECONDS) |
| 236 | + server_started_queue.get(block=True, timeout=THREADING_TIMEOUT_MAX) |
| 237 | + manual_entry_thread_started_queue.get(block=True, timeout=THREADING_TIMEOUT_MAX) |
238 | 238 | # Blocks until browser opens, but doesn't wait for user to close it
|
239 | 239 | webbrowser.open_new_tab(auto_login_url)
|
240 | 240 |
|
241 | 241 |
|
242 | 242 | # Wait for the Hyperdash server to redirect with the access token to our embedded
|
243 | 243 | # server, or for the user to manually enter an access token. Whichever happens
|
244 | 244 | # first.
|
245 |
| - access_token = access_token_queue.get(block=True, timeout=ONE_YEAR_IN_SECONDS) |
| 245 | + access_token = access_token_queue.get(block=True, timeout=THREADING_TIMEOUT_MAX) |
246 | 246 | # Use the access token to retrieve the user's API key and store a valid
|
247 | 247 | # hyperdash.json file
|
248 | 248 | success, default_api_key = _after_access_token_login(access_token)
|
|
0 commit comments