mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 22:45:27 +01:00
clnrest: Change process method to fork
On mac the clnrest plugin hangs on log messages, causing it to never run. This guide suggests switching to fork’ing instead of spwan’ing https://superfastpython.com/multiprocessing-common-errors/#Error_2_print_Does_Not_Work_In_Child_Processes Switching to fork fixes the hang on Mac. Changelog-None
This commit is contained in:
parent
98ad46795f
commit
8d5be61fcb
1 changed files with 2 additions and 0 deletions
|
@ -4,6 +4,7 @@ try:
|
|||
import sys
|
||||
import os
|
||||
import time
|
||||
import multiprocessing
|
||||
from gunicorn import glogging # noqa: F401
|
||||
from gunicorn.workers import sync # noqa: F401
|
||||
|
||||
|
@ -26,6 +27,7 @@ except ModuleNotFoundError as err:
|
|||
'result': {'disable': str(err)}}))
|
||||
sys.exit(1)
|
||||
|
||||
multiprocessing.set_start_method('fork')
|
||||
|
||||
jobs = {}
|
||||
app = Flask(__name__)
|
||||
|
|
Loading…
Add table
Reference in a new issue