mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-13 20:12:54 -07:00
Route stats background mode through isolated daemon and defer in-app startup to live daemon (#58)
This commit is contained in:
@@ -2,7 +2,7 @@ import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { spawn } from 'node:child_process';
|
||||
import { shell } from 'electron';
|
||||
import { sanitizeStartupEnv } from './main-entry-runtime';
|
||||
import { resolveStatsDaemonCommandAction, sanitizeStartupEnv } from './main-entry-runtime';
|
||||
import {
|
||||
isBackgroundStatsServerProcessAlive,
|
||||
readBackgroundStatsServerState,
|
||||
@@ -44,7 +44,7 @@ function hasFlag(argv: string[], flag: string): boolean {
|
||||
|
||||
function parseControlArgs(argv: string[], userDataPath: string): StatsDaemonControlArgs {
|
||||
return {
|
||||
action: hasFlag(argv, '--stats-daemon-stop') ? 'stop' : 'start',
|
||||
action: resolveStatsDaemonCommandAction(argv) ?? 'start',
|
||||
responsePath: readFlagValue(argv, '--stats-response-path'),
|
||||
openBrowser: hasFlag(argv, '--stats-daemon-open-browser'),
|
||||
daemonScriptPath: path.join(__dirname, 'stats-daemon-runner.js'),
|
||||
|
||||
Reference in New Issue
Block a user