mirror of
https://github.com/unraid/api.git
synced 2026-01-27 02:59:03 -06:00
fix: ensure nchan doesn't block server loading
This commit is contained in:
@@ -201,11 +201,6 @@ const load = async (): Promise<void> => {
|
||||
await loadPlugins();
|
||||
await loadWatchers();
|
||||
await loadApiKeys();
|
||||
|
||||
// Load nchan
|
||||
if (process.env.NCHAN !== 'disable') {
|
||||
await loadNchan();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -247,5 +242,6 @@ export const loadServer = async (name: string, server: typeof Server): Promise<v
|
||||
export const core = {
|
||||
loaders,
|
||||
load,
|
||||
loadServer
|
||||
loadServer,
|
||||
loadNchan
|
||||
};
|
||||
|
||||
@@ -34,6 +34,9 @@ am(async () => {
|
||||
|
||||
// Load server
|
||||
await loadServer('unraid-api', server);
|
||||
|
||||
// Load nchan
|
||||
await core.loadNchan();
|
||||
}, async (error: NodeJS.ErrnoException) => {
|
||||
// Send error to server for debugging
|
||||
Sentry.captureException(error);
|
||||
|
||||
Reference in New Issue
Block a user