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-issue-timedelta #5987

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/unreleased/fix-issue-timedelta-heartbeat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
description: Fixed issue with timedelta in heartbeat timer
change-type: patch
destination-branches: [master, iso6]
6 changes: 4 additions & 2 deletions src/inmanta/server/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,10 @@ async def get_calls(self, no_hang: bool) -> Optional[List[common.Request]]:
if no_hang:
timeout = 0.1
else:
timeout = self._interval

timeout = self._interval if self._interval > 0.1 else 0.1
# We choose to have a minimum of 0.1 as timeout as this is also the value used for no_hang.
# Furthermore, the timeout value cannot be zero as this causes an issue with Tornado:
# https://github.com/tornadoweb/tornado/issues/3271
call = await self._queue.get(timeout=timedelta(seconds=timeout))
if call is None:
# aborting session
Expand Down