mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-09 00:56:16 +00:00
Fix multiple cluster bug and webhook disable (#23)
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
|
||||
|
||||
@@ -374,6 +374,10 @@ export async function sendErrorReport(
|
||||
error: Error | string,
|
||||
additionalContext?: Record<string, unknown>
|
||||
): Promise<void> {
|
||||
// Error reporting not available as 12/26/2025 because of vulnerabilities
|
||||
// View here: https://ptb.discord.com/channels/1418201715009912866/1418201717098418249/1454198384813412534
|
||||
return
|
||||
|
||||
// Check if error reporting is enabled
|
||||
if (config.errorReporting?.enabled === false) {
|
||||
process.stderr.write('[ErrorReporting] Disabled in config (errorReporting.enabled = false)\n')
|
||||
@@ -382,7 +386,7 @@ export async function sendErrorReport(
|
||||
|
||||
// Log that error reporting is enabled
|
||||
process.stderr.write('[ErrorReporting] Enabled, processing error...\n')
|
||||
|
||||
|
||||
try {
|
||||
pruneExpiredDisabledWebhooks()
|
||||
// Build candidate webhook list:
|
||||
|
||||
Reference in New Issue
Block a user