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 7ca77ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -235,7 +235,7 @@ def _resend(
clients = list(resend_dict.keys())
if log.isEnabledFor(logging.DEBUG):
client_ids = ','.join(map(str, clients))
log.debug('sending upstreams to %s length: %d', client_ids, len(data))
log.debug('sending data to %s length: %d', client_ids, len(data))
resend_dict.clear()

for worker_id in clients:
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
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ preview = true

[tool.ruff.format]
quote-style = 'single'
#skip-magic-trailing-comma = true

[tool.ruff.lint]
select = [
Expand Down

0 comments on commit 7ca77ab

Please sign in to comment.