mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-09 00:56:16 +00:00
fix: multi cluster bug
(reported on discord) Case 1 https://ptb.discord.com/channels/1418201715009912866/1452266368723456154 Case 2 https://ptb.discord.com/channels/1418201715009912866/1454274029534969910 Signed-off-by: Luis Antonio <hi@zaorinu.is-a.dev>
This commit is contained in:
@@ -997,7 +997,7 @@ async function main(): Promise<void> {
|
||||
}
|
||||
|
||||
// Check for dashboard mode flag (standalone dashboard)
|
||||
if (process.argv.includes('-dashboard')) {
|
||||
if (cluster.isPrimary && process.argv.includes('-dashboard')) {
|
||||
const { startDashboardServer } = await import('./dashboard/server')
|
||||
const { dashboardState } = await import('./dashboard/state')
|
||||
log('main', 'DASHBOARD', 'Starting standalone dashboard server...')
|
||||
@@ -1024,7 +1024,7 @@ async function main(): Promise<void> {
|
||||
let scheduler: InternalScheduler | null = null
|
||||
|
||||
// Auto-start dashboard if enabled in config
|
||||
if (config.dashboard?.enabled) {
|
||||
if (cluster.isPrimary && config.dashboard?.enabled) {
|
||||
const { DashboardServer } = await import('./dashboard/server')
|
||||
const { dashboardState } = await import('./dashboard/state')
|
||||
const port = config.dashboard.port || 3000
|
||||
|
||||
Reference in New Issue
Block a user