Skip to content

Commit

Permalink
Deactivate Python-level timeout with SIGALRM fixes #HXL-40
Browse files Browse the repository at this point in the history
Prepare 1.28.1 release
  • Loading branch information
davidmegginson committed Mar 29, 2023
1 parent 0416485 commit 278c52e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2023-03-29 Release 1.28.1
- temporarily deactivate Python-layer timeout (causing random request failures)

2023-03-20 Release 1.28
- remove controller support for adding or editing saved recipes
- request code stops running after a configurable timeout (default: 30 seconds)
Expand Down
2 changes: 1 addition & 1 deletion hxl_proxy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"""

__version__="1.28"
__version__="1.28.1"
"""Module version number
See https://www.python.org/dev/peps/pep-0396/
Expand Down
4 changes: 2 additions & 2 deletions hxl_proxy/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def handle_alarm_signal(signum, frame):
logup('Request timed out', level='info')
raise TimeoutError()

signal.signal(signal.SIGALRM, handle_alarm_signal)
# signal.signal(signal.SIGALRM, handle_alarm_signal) # temporarily deactivated



Expand Down Expand Up @@ -187,7 +187,7 @@ def before_request():
timeout = int(app.config.get('TIMEOUT', 30))
except ValueError:
timeout = 30
signal.alarm(timeout)
# signal.alarm(timeout) # temporarily deactivated



Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
name = 'hxl-proxy',
packages = ['hxl_proxy'],
package_data={'hxl_proxy': ['*.sql']},
version = "1.28",
version = "1.28.1",
description = 'Flask-based web proxy for HXL',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
3 changes: 2 additions & 1 deletion tests/test_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ def make_recipe():

class TestTimeout(AbstractControllerTest):

# temporarily deactivated
@patch(URL_MOCK_TARGET, new=URL_MOCK_OBJECT)
def test_timeout(self):
def x_test_timeout(self):
""" Confirm that a time returns a 408 error """

# Use a sting to ensure conversion is working
Expand Down

0 comments on commit 278c52e

Please sign in to comment.