fix: register fault hander after gunicorn registers signals (#28976)

Ugh, currently gunicorn is overriding our signal handler and we don't
care about gunicorn's SIGUSR1 handler.
This commit is contained in:
Ankush Menat 2024-12-31 19:31:19 +05:30 committed by GitHub
parent bd3af4391f
commit c75febb5d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View file

@ -279,6 +279,7 @@ def init(site: str, sites_path: str = ".", new_site: bool = False, force: bool =
if not _one_time_setup.get(local.conf.db_type):
patch_query_execute()
patch_query_aggregation()
frappe._optimizations.register_fault_handler()
_one_time_setup[local.conf.db_type] = True
setup_module_map(include_all_apps=not (frappe.request or frappe.job or frappe.flags.in_migrate))

View file

@ -30,8 +30,6 @@ def optimize_all():
optimize_gc_parameters()
optimize_gc_for_copy_on_write()
optimize_for_gil_contention()
register_fault_handler()
os.register_at_fork(after_in_child=register_fault_handler)
def optimize_gc_parameters():