mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-03 10:30:51 +08:00
feat: introduce WebSocket sync for XBoard nodes
- Implement Workerman-based `xboard:ws-server` for real-time node synchronization. - Support custom routes, outbounds, and certificate configurations via JSON. - Optimize scheduled tasks with `lazyById` to minimize memory footprint. - Enhance reactivity using Observers for `Plan`, `Server`, and `ServerRoute`. - Expand protocol support for `httpupgrade`, `h2`, and `mieru`.
This commit is contained in:
@@ -155,7 +155,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'memory_limit' => 64,
|
||||
'memory_limit' => 256,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -169,22 +169,57 @@ return [
|
||||
*/
|
||||
|
||||
'environments' => [
|
||||
'production' => [
|
||||
'data-pipeline' => [
|
||||
'connection' => 'redis',
|
||||
'queue' => ['traffic_fetch', 'stat', 'user_alive_sync'],
|
||||
'balance' => 'auto',
|
||||
'autoScalingStrategy' => 'time',
|
||||
'minProcesses' => 1,
|
||||
'maxProcesses' => 8,
|
||||
'balanceCooldown' => 1,
|
||||
'tries' => 3,
|
||||
'timeout' => 30,
|
||||
],
|
||||
'business' => [
|
||||
'connection' => 'redis',
|
||||
'queue' => ['default', 'order_handle'],
|
||||
'balance' => 'simple',
|
||||
'minProcesses' => 1,
|
||||
'maxProcesses' => 3,
|
||||
'tries' => 3,
|
||||
'timeout' => 30,
|
||||
],
|
||||
'notification' => [
|
||||
'connection' => 'redis',
|
||||
'queue' => ['send_email', 'send_telegram', 'send_email_mass'],
|
||||
'balance' => 'auto',
|
||||
'autoScalingStrategy' => 'size',
|
||||
'minProcesses' => 1,
|
||||
'maxProcesses' => 3,
|
||||
'tries' => 3,
|
||||
'timeout' => 60,
|
||||
'backoff' => [3, 10, 30],
|
||||
],
|
||||
],
|
||||
'local' => [
|
||||
'Xboard' => [
|
||||
'connection' => 'redis',
|
||||
'queue' => [
|
||||
'default',
|
||||
'order_handle',
|
||||
'traffic_fetch',
|
||||
'stat',
|
||||
'send_email',
|
||||
'send_email_mass',
|
||||
'send_telegram',
|
||||
'online_sync'
|
||||
'user_alive_sync',
|
||||
],
|
||||
'balance' => 'auto',
|
||||
'minProcesses' => 1,
|
||||
'maxProcesses' => 20,
|
||||
'maxProcesses' => 5,
|
||||
'tries' => 1,
|
||||
'timeout' => 60,
|
||||
'balanceCooldown' => 3,
|
||||
],
|
||||
],
|
||||
|
||||
@@ -79,7 +79,7 @@ return [
|
||||
],
|
||||
|
||||
RequestTerminated::class => [
|
||||
// FlushUploadedFiles::class,
|
||||
FlushUploadedFiles::class,
|
||||
],
|
||||
|
||||
TaskReceived::class => [
|
||||
@@ -102,8 +102,8 @@ return [
|
||||
|
||||
OperationTerminated::class => [
|
||||
FlushTemporaryContainerInstances::class,
|
||||
// DisconnectFromDatabases::class,
|
||||
// CollectGarbage::class,
|
||||
DisconnectFromDatabases::class,
|
||||
CollectGarbage::class,
|
||||
],
|
||||
|
||||
WorkerErrorOccurred::class => [
|
||||
@@ -132,7 +132,7 @@ return [
|
||||
],
|
||||
|
||||
'flush' => [
|
||||
//
|
||||
\App\Services\Plugin\HookManager::class,
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -147,8 +147,8 @@ return [
|
||||
*/
|
||||
|
||||
'cache' => [
|
||||
'rows' => 1000,
|
||||
'bytes' => 10000,
|
||||
'rows' => 5000,
|
||||
'bytes' => 20000,
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -203,7 +203,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'garbage' => 50,
|
||||
'garbage' => 128,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -216,6 +216,6 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'max_execution_time' => 30,
|
||||
'max_execution_time' => 60,
|
||||
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user