mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-10 17:26:17 +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)
|
// 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 { startDashboardServer } = await import('./dashboard/server')
|
||||||
const { dashboardState } = await import('./dashboard/state')
|
const { dashboardState } = await import('./dashboard/state')
|
||||||
log('main', 'DASHBOARD', 'Starting standalone dashboard server...')
|
log('main', 'DASHBOARD', 'Starting standalone dashboard server...')
|
||||||
@@ -1024,7 +1024,7 @@ async function main(): Promise<void> {
|
|||||||
let scheduler: InternalScheduler | null = null
|
let scheduler: InternalScheduler | null = null
|
||||||
|
|
||||||
// Auto-start dashboard if enabled in config
|
// Auto-start dashboard if enabled in config
|
||||||
if (config.dashboard?.enabled) {
|
if (cluster.isPrimary && config.dashboard?.enabled) {
|
||||||
const { DashboardServer } = await import('./dashboard/server')
|
const { DashboardServer } = await import('./dashboard/server')
|
||||||
const { dashboardState } = await import('./dashboard/state')
|
const { dashboardState } = await import('./dashboard/state')
|
||||||
const port = config.dashboard.port || 3000
|
const port = config.dashboard.port || 3000
|
||||||
|
|||||||
@@ -374,6 +374,10 @@ export async function sendErrorReport(
|
|||||||
error: Error | string,
|
error: Error | string,
|
||||||
additionalContext?: Record<string, unknown>
|
additionalContext?: Record<string, unknown>
|
||||||
): Promise<void> {
|
): 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
|
// Check if error reporting is enabled
|
||||||
if (config.errorReporting?.enabled === false) {
|
if (config.errorReporting?.enabled === false) {
|
||||||
process.stderr.write('[ErrorReporting] Disabled in config (errorReporting.enabled = false)\n')
|
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
|
// Log that error reporting is enabled
|
||||||
process.stderr.write('[ErrorReporting] Enabled, processing error...\n')
|
process.stderr.write('[ErrorReporting] Enabled, processing error...\n')
|
||||||
|
|
||||||
try {
|
try {
|
||||||
pruneExpiredDisabledWebhooks()
|
pruneExpiredDisabledWebhooks()
|
||||||
// Build candidate webhook list:
|
// Build candidate webhook list:
|
||||||
|
|||||||
Reference in New Issue
Block a user