Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect timeout warnings in AWS Lambda and GCP integrations #854

Merged
merged 6 commits into from Oct 14, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions sentry_sdk/utils.py
Expand Up @@ -898,12 +898,16 @@ def run(self):

raise_exception = True
threading_is_running = True
while threading_is_running and self.waiting_time > 1:
time.sleep(1)
self.waiting_time = self.waiting_time - 1
start_time = time.time()

while threading_is_running:
if self.stop_thread:
raise_exception = False
threading_is_running = False
current_time = time.time()
elapsed_time = current_time - start_time
if elapsed_time >= self.waiting_time:
threading_is_running = False
rhcarvalho marked this conversation as resolved.
Show resolved Hide resolved

if raise_exception:
rhcarvalho marked this conversation as resolved.
Show resolved Hide resolved
time.sleep(self.waiting_time)
Expand Down