mirror of
https://github.com/fastogt/fastocloud_admin.git
synced 2025-03-09 23:38:52 +00:00
Review
This commit is contained in:
parent
b83a52af02
commit
a1edaa1ed6
3 changed files with 3 additions and 4 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 201c631c2464927690c3fe3b1c0d26853faa9586
|
Subproject commit 111b60787080a1443d3d1ac09ea793b2eb605ca2
|
|
@ -82,7 +82,7 @@ class ServiceManager(IClientHandler):
|
||||||
|
|
||||||
for client in self._subscribers:
|
for client in self._subscribers:
|
||||||
if ts_sec - client.last_ping_ts > ServiceManager.PING_SUBSCRIBERS_SEC:
|
if ts_sec - client.last_ping_ts > ServiceManager.PING_SUBSCRIBERS_SEC:
|
||||||
#client.ping()
|
client.ping(client.gen_request_id())
|
||||||
client.last_ping_ts = ts_sec
|
client.last_ping_ts = ts_sec
|
||||||
|
|
||||||
def process_response(self, client, req: Request, resp: Response):
|
def process_response(self, client, req: Request, resp: Response):
|
||||||
|
|
|
@ -52,8 +52,7 @@ class SubscriberConnection(SubscriberClient):
|
||||||
self.process_commands(data)
|
self.process_commands(data)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# private
|
def gen_request_id(self) -> int:
|
||||||
def _gen_request_id(self) -> int:
|
|
||||||
current_value = self._request_id
|
current_value = self._request_id
|
||||||
self._request_id += 1
|
self._request_id += 1
|
||||||
return current_value
|
return current_value
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue