-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/collect process init status (#713)
* Collect process init status * remove mark * remove mark * remove useless code * update frontend package socket.io-client
- Loading branch information
Showing
11 changed files
with
266 additions
and
484 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,12 @@ | ||
|
||
import multiprocessing | ||
|
||
from lyrebird import application | ||
from lyrebird.log import get_logger | ||
from .server import serve | ||
|
||
from .server import serve, publish_init_status | ||
from lyrebird.base_server import ProcessServer | ||
|
||
logger = get_logger() | ||
|
||
|
||
class ExtraMockServer(): | ||
def __init__(self) -> None: | ||
self._server_process = None | ||
|
||
def start(self): | ||
self._server_process = multiprocessing.Process( | ||
group=None, | ||
daemon=True, | ||
target=serve, | ||
kwargs={'config': application.config.raw()}) | ||
self._server_process.start() | ||
class ExtraMockServer(ProcessServer): | ||
|
||
def stop(self): | ||
if self._server_process: | ||
self._server_process.terminate() | ||
logger.warning(f'MockServer shutdown') | ||
self._server_process = None | ||
def run(self, queue, config, *args, **kwargs): | ||
publish_init_status(queue, 'READY') | ||
serve(queue, config, *args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters