feature/IO-3205-Paint-Scale-Integrations: Adjust keep alive timer to 15 mins from 5

This commit is contained in:
Dave Richer
2025-04-30 11:52:21 -04:00
parent 7933a8965c
commit a2511685ac
2 changed files with 43 additions and 33 deletions

View File

@@ -7,6 +7,9 @@ import log from "electron-log/main";
const execPromise = promisify(exec);
// Define the interval as a variable (in seconds)
const KEEP_ALIVE_INTERVAL_SECONDS = 15 * 60; // 15 minutes
export async function setupKeepAliveAgent(): Promise<void> {
const plistContent = `<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@@ -22,7 +25,7 @@ export async function setupKeepAliveAgent(): Promise<void> {
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>300</integer>
<integer>${KEEP_ALIVE_INTERVAL_SECONDS}</integer>
</dict>
</plist>`;