Skip to content

Commit 921c20a

Browse files
committed
Fix security ssl cert
1 parent 6690c12 commit 921c20a

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

container/cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ async def __call__(self) -> io.BytesIO:
279279
storage: FileStorage = FileStorage(Path("bmclapi"))
280280
async def init():
281281
global storage
282-
#Timer.delay(storage.check_file)
282+
Timer.delay(storage.check_file)
283283
app = web.app
284284
@app.get("/measure/{size}")
285285
async def _(request: web.Request, size: int, s: str, e: str):

main.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,13 @@ def on_any_event(self, event: FileSystemEvent) -> None:
114114
if process is None or process.poll() != None:
115115
return
116116
print(f"The container file have been changed! File: {event.src_path}")
117-
process.kill()
118-
process.terminate()
117+
_kill()
118+
def _kill():
119+
global process
120+
if process is None or process.poll() != None:
121+
return
122+
process.kill()
123+
process.terminate()
119124
if __name__ == "__main__":
120125
if len(sys.argv) == 1:
121126
print("Not Container Path.")
@@ -139,4 +144,5 @@ def on_any_event(self, event: FileSystemEvent) -> None:
139144
time.sleep(1)
140145
except KeyboardInterrupt:
141146
observer.stop()
142-
observer.join()
147+
observer.join()
148+
_kill()

0 commit comments

Comments
 (0)