File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed
src/opengeodeweb_viewer/rpc Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change 11# Standard library imports
22import os
3- import time
3+
4+ # Third party imports
5+ from wslink import register as exportRpc # type: ignore
6+
7+ # Local application imports
8+ from opengeodeweb_microservice .schemas import get_schemas_dict
9+ from opengeodeweb_viewer .vtk_protocol import VtkView
10+
11+
12+ class VtkUtilsView (VtkView ):
13+ utils_prefix = "opengeodeweb_viewer."
14+ utils_schemas_dict = get_schemas_dict (
15+ os .path .join (os .path .dirname (__file__ ), "schemas" )
16+ )
17+
18+ def __init__ (self ) -> None :
19+ super ().__init__ ()
20+
21+ @exportRpc (utils_prefix + utils_schemas_dict ["kill" ]["rpc" ])
22+ # Standard library imports
23+ import os
424
525# Third party imports
626from wslink import register as exportRpc # type: ignore
@@ -21,7 +41,6 @@ def __init__(self) -> None:
2141
2242 @exportRpc (utils_prefix + utils_schemas_dict ["kill" ]["rpc" ])
2343 def kill (self ) -> None :
44+ print (f"{ self .utils_prefix + self .utils_schemas_dict ['kill' ]['rpc' ]} " , flush = True )
2445 print ("Manual viewer kill, shutting down..." , flush = True )
25- self .publish ("kill" , "Viewer killed" )
26- time .sleep (5 )
2746 os ._exit (0 )
You can’t perform that action at this time.
0 commit comments