Skip to content

Commit

Permalink
More guard
Browse files Browse the repository at this point in the history
Signed-off-by: Joey Yu <[email protected]>
  • Loading branch information
itsjoeoui committed Apr 26, 2023
1 parent 7516cfd commit 8e02721
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internal/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

from src.internal.manager import Location
from src.internal.type import Status, WsType
from src.utils.config import manager, cluster_group, etcd_client
from src.utils.config import manager, cluster_group, etcd_client, is_prod
from src.utils.ws import update


async def state_saver():
while True:
while is_prod:
await asyncio.sleep(10)
serialized_manager = pickle.dumps(manager)
etcd_client.put("manager", serialized_manager)
Expand Down

0 comments on commit 8e02721

Please sign in to comment.