Skip to content

Conversation

@loks0n
Copy link
Member

@loks0n loks0n commented Dec 31, 2025

No description provided.

@loks0n loks0n force-pushed the feat-coroutines branch 4 times, most recently from 43b89b8 to 63c546e Compare January 1, 2026 19:31
'buffer_output_size' => $payloadSize,
'worker_num' => (int)System::getEnv('OPR_EXECUTOR_WORKER_NUM', '1'),
'task_worker_num' => 0,
'max_coroutine' => (int)System::getEnv('OPR_EXECUTOR_MAX_COROUTINES', '100000'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small suggestion to make this clearer

-'max_coroutine' => (int)System::getEnv('OPR_EXECUTOR_MAX_COROUTINES', '100000'),
+'max_coroutine' => (int)System::getEnv('OPR_EXECUTOR_MAX_COROUTINES', '100_000'), // Swoole's built-in default

'package_max_length' => $payloadSize,
'buffer_output_size' => $payloadSize,
'worker_num' => (int)System::getEnv('OPR_EXECUTOR_WORKER_NUM', '1'),
'task_worker_num' => 0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

task_worker_num by default is 0, any reason to explicitly mark the value here?

}
batch($jobsRuntimes);

$this->networkManager->removeAll();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to call removeNetworks here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't do it here, Http controls the signal handling

}

public function connectAll(Container $container): void
private function ensure(string $network): ?string
Copy link
Member

@ChiragAgg5k ChiragAgg5k Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: very small opinion of mine to have public methods placed above private ones so the class is easier to follow

in this case maybe current setup makes more sense since ensure is used directly above? so feel free to ignore if u feel otherwise

$this->orchestration->createNetwork($network, false);
Console::success("[NetworkManager] Created network: {$network}");
return $network;
} catch (\Throwable $e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we retain the TODO comment here?

fn ($network) => fn () => $this->remove($network),
$this->available
));
foreach ($networks as $network) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason for removing batch here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unnecessary imo, we only have one network... even multiple would be fast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants