瀏覽代碼

hourly heartbeat

Jeffrey Morgan 1 年之前
父節點
當前提交
660dee7005
共有 1 個文件被更改,包括 4 次插入7 次删除
  1. 4 7
      app/src/index.ts

+ 4 - 7
app/src/index.ts

@@ -8,8 +8,7 @@ import { analytics, id } from './telemetry'
 
 
 require('@electron/remote/main').initialize()
 require('@electron/remote/main').initialize()
 
 
-
-const store = new Store();
+const store = new Store()
 let tray: Tray | null = null
 let tray: Tray | null = null
 
 
 const SingleInstanceLock = app.requestSingleInstanceLock()
 const SingleInstanceLock = app.requestSingleInstanceLock()
@@ -26,9 +25,7 @@ const createSystemtray = () => {
 
 
   tray = new Tray(iconPath)
   tray = new Tray(iconPath)
 
 
-  const contextMenu = Menu.buildFromTemplate([
-    { role: 'quit', label: 'Quit Ollama', accelerator: 'Command+Q' }
-  ])
+  const contextMenu = Menu.buildFromTemplate([{ role: 'quit', label: 'Quit Ollama', accelerator: 'Command+Q' }])
 
 
   tray.setContextMenu(contextMenu)
   tray.setContextMenu(contextMenu)
   tray.setToolTip('Ollama')
   tray.setToolTip('Ollama')
@@ -115,7 +112,7 @@ app.on('ready', () => {
     if (!store.has('first-time-run')) {
     if (!store.has('first-time-run')) {
       // This is the first run
       // This is the first run
       app.setLoginItemSettings({ openAtLogin: true })
       app.setLoginItemSettings({ openAtLogin: true })
-      store.set('first-time-run', false);
+      store.set('first-time-run', false)
     } else {
     } else {
       // The app has been run before
       // The app has been run before
       app.setLoginItemSettings({ openAtLogin: app.getLoginItemSettings().openAtLogin })
       app.setLoginItemSettings({ openAtLogin: app.getLoginItemSettings().openAtLogin })
@@ -194,7 +191,7 @@ if (app.isPackaged) {
   setInterval(() => {
   setInterval(() => {
     heartbeat()
     heartbeat()
     autoUpdater.checkForUpdates()
     autoUpdater.checkForUpdates()
-  }, 60000)
+  }, 60 * 60 * 1000)
 }
 }
 
 
 autoUpdater.on('error', e => {
 autoUpdater.on('error', e => {