From 113ee694d2d1ba6e7f70078f3694a06031384596 Mon Sep 17 00:00:00 2001 From: yingshaoxo Date: Sun, 19 Mar 2023 06:37:12 +0000 Subject: [PATCH] add logs function to the development_tools_party --- development_tools_party.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/development_tools_party.py b/development_tools_party.py index ac45de4..e2593f7 100755 --- a/development_tools_party.py +++ b/development_tools_party.py @@ -12,8 +12,6 @@ from pprint import pprint -from regex import F - py = Python() t = Terminal(debug=True) disk = Disk() @@ -29,6 +27,7 @@ class Tools(): def __init__(self) -> None: self.project_root_folder = disk.get_directory_name(os.path.realpath(os.path.abspath(__file__))) self.protobuff_protocols_folder = disk.join_paths(self.project_root_folder, "party_protocols", "protocols") + self.party_protocols_folder = disk.join_paths(self.project_root_folder, "party_protocols") def help(self): print(help(Tools)) @@ -109,6 +108,12 @@ def build_management_system_protocols(self): self.build_management_system_golang_backend_service_protocols() self.build_management_system_flutter_web_client_protocols() + def logs(self): + t.run(f""" + cd {self.party_protocols_folder} + docker-compose -f docker-compose.service.yaml logs -f + """) + py.make_it_global_runnable(executable_name="development_tools_party") py.fire(Tools)