mirror of
https://github.com/lone-cloud/prism
synced 2026-06-03 19:54:44 -07:00
more time for the daemon to start up for slow hardware
This commit is contained in:
parent
606c4c6f23
commit
0e3eb43531
3 changed files with 4 additions and 8 deletions
|
|
@ -21,11 +21,7 @@ import unifiedpush from '@/routes/unified-push';
|
||||||
import { isLocalIP } from '@/utils/auth';
|
import { isLocalIP } from '@/utils/auth';
|
||||||
import { logError, logInfo, logVerbose, logWarn } from '@/utils/log';
|
import { logError, logInfo, logVerbose, logWarn } from '@/utils/log';
|
||||||
|
|
||||||
try {
|
initSignal();
|
||||||
await initSignal();
|
|
||||||
} catch (error) {
|
|
||||||
logError(`${error instanceof Error ? error.message : String(error)}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!API_KEY) {
|
if (!API_KEY) {
|
||||||
logWarn('Server running without API_KEY');
|
logWarn('Server running without API_KEY');
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ export async function startProtonMonitor() {
|
||||||
|
|
||||||
if (!(await hasValidAccount())) {
|
if (!(await hasValidAccount())) {
|
||||||
logWarn('Signal account not linked. Proton Mail notifications will be skipped.');
|
logWarn('Signal account not linked. Proton Mail notifications will be skipped.');
|
||||||
logWarn('Link your Signal account at /link to enable email notifications.');
|
logWarn('Link your Signal account to enable email notifications.');
|
||||||
}
|
}
|
||||||
|
|
||||||
logInfo(`Connecting to Proton Bridge at ${PROTON_BRIDGE_HOST}:${PROTON_BRIDGE_PORT}`);
|
logInfo(`Connecting to Proton Bridge at ${PROTON_BRIDGE_HOST}:${PROTON_BRIDGE_PORT}`);
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,7 @@ export async function startDaemon() {
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
for (let i = 0; i < 20; i++) {
|
for (let i = 0; i < 60; i++) {
|
||||||
await Bun.sleep(500);
|
await Bun.sleep(500);
|
||||||
try {
|
try {
|
||||||
const socket = await Bun.connect({
|
const socket = await Bun.connect({
|
||||||
|
|
@ -255,7 +255,7 @@ export async function startDaemon() {
|
||||||
return startDaemon();
|
return startDaemon();
|
||||||
}
|
}
|
||||||
|
|
||||||
logError('Failed to connect to signal-cli socket: daemon did not start within 10 seconds');
|
logError('Failed to connect to signal-cli socket: daemon did not start within 30 seconds');
|
||||||
if (proc.exitCode !== null) {
|
if (proc.exitCode !== null) {
|
||||||
logError('signal-cli process exited with code:', proc.exitCode);
|
logError('signal-cli process exited with code:', proc.exitCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue