diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c47b9b5f..894db214a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## [1.5.4] - 2024-08-20 + +### Fixed +- Downgraded `uWSGI` due to issues with workers not being killed + promptly during the restart process. + ## [1.5.3] - 2024-08-18 ### Fixed diff --git a/docassemble_base/docassemble/base/config.py b/docassemble_base/docassemble/base/config.py index f78153c4c..bd5542f99 100644 --- a/docassemble_base/docassemble/base/config.py +++ b/docassemble_base/docassemble/base/config.py @@ -624,6 +624,8 @@ def load(**kwargs): daconfig['administrative interviews'] = new_admin_interviews else: del daconfig['administrative interviews'] + if 'single server' in daconfig: + daconfig['single server'] = bool(daconfig['single server']) if 'session lifetime seconds' in daconfig: try: daconfig['session lifetime seconds'] = int(daconfig['session lifetime seconds']) diff --git a/docassemble_webapp/docassemble/webapp/server.py b/docassemble_webapp/docassemble/webapp/server.py index 29a6d78ab..a64eac453 100644 --- a/docassemble_webapp/docassemble/webapp/server.py +++ b/docassemble_webapp/docassemble/webapp/server.py @@ -537,7 +537,8 @@ def update_editable(): NOTIFICATION_MESSAGE = daconfig.get('alert html', '<div class="da-alert alert alert-%s alert-dismissible fade show" role="alert">%s<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button></div>') USING_SUPERVISOR = bool(os.environ.get('SUPERVISOR_SERVER_URL', None)) -SINGLE_SERVER = USING_SUPERVISOR and bool(':all:' in ':' + os.environ.get('CONTAINERROLE', 'all') + ':') +SINGLE_SERVER = daconfig.get('single server', USING_SUPERVISOR and bool(':all:' in ':' + os.environ.get('CONTAINERROLE', 'all') + ':')) + audio_mimetype_table = {'mp3': 'audio/mpeg', 'ogg': 'audio/ogg'} @@ -17069,7 +17070,7 @@ def update_package_ajax(): if isinstance(the_result, ReturnValue): if the_result.ok: # logmessage("update_package_ajax: success") - if (hasattr(the_result, 'restart') and not the_result.restart) or (START_TIME > session['serverstarttime'] and not (SINGLE_SERVER and reset_process_running())): + if (hasattr(the_result, 'restart') and not the_result.restart) or (START_TIME > session['serverstarttime'] and not reset_process_running()): return jsonify(success=True, status='finished', ok=the_result.ok, summary=summarize_results(the_result.results, the_result.logmessages)) return jsonify(success=True, status='waiting') if hasattr(the_result, 'error_message'): @@ -29262,7 +29263,7 @@ def api_package_update_status(): the_result = result.get() if isinstance(the_result, ReturnValue): if the_result.ok: - if the_result.restart and (START_TIME <= task_info['server_start_time'] or (SINGLE_SERVER and reset_process_running())): + if the_result.restart and (START_TIME <= task_info['server_start_time'] or reset_process_running()): return jsonify(status='working') r.expire(the_key, 30) return jsonify(status='completed', ok=True, log=summarize_results(the_result.results, the_result.logmessages, html=False)) @@ -29540,7 +29541,7 @@ def api_restart_status(): if task_data is None: return jsonify(status='unknown') task_info = json.loads(task_data.decode()) - if START_TIME <= task_info['server_start_time'] or (SINGLE_SERVER and reset_process_running()): + if START_TIME <= task_info['server_start_time'] or reset_process_running(): return jsonify(status='working') r.expire(the_key, 30) return jsonify(status='completed') diff --git a/docassemble_webapp/setup.py b/docassemble_webapp/setup.py index 8aa204009..5d739d58c 100644 --- a/docassemble_webapp/setup.py +++ b/docassemble_webapp/setup.py @@ -288,7 +288,7 @@ def read(fname): "urllib3==2.2.2", "us==3.2.0", "user-agents==2.2.0", - "uWSGI==2.0.25.1", + "uWSGI==2.0.23", "vine==5.1.0", "wcwidth==0.2.13", "webdriver-manager==4.0.2",