Skip to content

Commit

Permalink
important fix
Browse files Browse the repository at this point in the history
  • Loading branch information
712u3 committed Mar 18, 2024
1 parent 253d949 commit 9a9c3db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontik/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _start_child(worker_id: int, worker_state: WorkerState, worker_function: Cal
os.set_blocking(read_fd, False)
os.set_blocking(write_fd, False)

pid = os.fork() # тут чето мне недавали сделать fdopen но мб потомучто я в другом процессе не закрыл
pid = os.fork()
if pid == 0: # worker
os.close(write_fd)
worker_state.is_master = False
Expand Down
5 changes: 2 additions & 3 deletions frontik/service_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,8 @@ def _combine_servers(self, key: str) -> list[Server]:
return servers_from_all_dc

def update_upstreams(self, upstreams: list[Upstream]) -> None:
with self._upstreams_lock:
for upstream in upstreams:
self._update_upstream(upstream)
for upstream in upstreams:
self._update_upstream(upstream)

def _update_upstream(self, upstream: Upstream) -> None:
current_upstream = self._upstreams.get(upstream.name)
Expand Down

0 comments on commit 9a9c3db

Please sign in to comment.