mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-07-04 20:17:16 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
ab2d321104 | |||
aada468916 |
@ -821,6 +821,16 @@ later is required to fix a server side protocol bug.
|
|||||||
jobs = jobs_str(len(items))
|
jobs = jobs_str(len(items))
|
||||||
return f"{jobs} | {elapsed_str(elapsed)} {earliest_proj}"
|
return f"{jobs} | {elapsed_str(elapsed)} {earliest_proj}"
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def InitWorker(cls):
|
||||||
|
# Force connect to the manager server now.
|
||||||
|
# This is good because workers are initialized one by one. Without this,
|
||||||
|
# multiple workers may connect to the manager when handling the first
|
||||||
|
# job at the same time. Then the connection may fail if too many
|
||||||
|
# connections are pending and execeeded the socket listening backlog,
|
||||||
|
# especially on MacOS.
|
||||||
|
len(cls.get_parallel_context()["sync_dict"])
|
||||||
|
|
||||||
def _Fetch(self, projects, opt, err_event, ssh_proxy, errors):
|
def _Fetch(self, projects, opt, err_event, ssh_proxy, errors):
|
||||||
ret = True
|
ret = True
|
||||||
|
|
||||||
@ -913,6 +923,7 @@ later is required to fix a server side protocol bug.
|
|||||||
# idle while other workers still have more than one job in
|
# idle while other workers still have more than one job in
|
||||||
# their chunk queue.
|
# their chunk queue.
|
||||||
chunksize=1,
|
chunksize=1,
|
||||||
|
initializer=self.InitWorker,
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
sync_event.set()
|
sync_event.set()
|
||||||
|
@ -737,8 +737,8 @@ Gerrit Code Review: https://www.gerritcodereview.com/
|
|||||||
pending = []
|
pending = []
|
||||||
for result in results:
|
for result in results:
|
||||||
project_idx, avail = result
|
project_idx, avail = result
|
||||||
|
project = projects[project_idx]
|
||||||
if avail is None:
|
if avail is None:
|
||||||
project = projects[project_idx]
|
|
||||||
logger.error(
|
logger.error(
|
||||||
'repo: error: %s: Unable to upload branch "%s". '
|
'repo: error: %s: Unable to upload branch "%s". '
|
||||||
"You might be able to fix the branch by running:\n"
|
"You might be able to fix the branch by running:\n"
|
||||||
@ -748,7 +748,7 @@ Gerrit Code Review: https://www.gerritcodereview.com/
|
|||||||
project.manifest.branch,
|
project.manifest.branch,
|
||||||
)
|
)
|
||||||
elif avail:
|
elif avail:
|
||||||
pending.append(result)
|
pending.append((project, avail))
|
||||||
return pending
|
return pending
|
||||||
|
|
||||||
with self.ParallelContext():
|
with self.ParallelContext():
|
||||||
|
Reference in New Issue
Block a user