remove period screenshot

This commit is contained in:
geekgeekrun
2026-01-22 13:24:43 +08:00
parent afe8a820c1
commit 5ab7fc2ee2
2 changed files with 24 additions and 24 deletions

View File

@@ -15,7 +15,7 @@ import SqlitePluginModule from '@geekgeekrun/sqlite-plugin'
import gtag from '../../utils/gtag'
import GtagPlugin from '../../utils/gtag/GtagPlugin'
import { connectToDaemon, sendToDaemon } from '../OPEN_SETTING_WINDOW/connect-to-daemon'
import { PeriodPushCurrentPageScreenshotPlugin } from '../../utils/screenshot'
// import { PeriodPushCurrentPageScreenshotPlugin } from '../../utils/screenshot'
import { checkShouldExit } from '../../utils/worker'
import { UserResponseInfoPlugin } from '../../features/boss-user-info-response-plugin'
const { default: SqlitePlugin } = SqlitePluginModule
@@ -35,7 +35,7 @@ const initPlugins = (hooks) => {
new DingtalkPlugin(dingTalkAccessToken).apply(hooks)
new SqlitePlugin(getPublicDbFilePath()).apply(hooks)
new GtagPlugin().apply(hooks)
new PeriodPushCurrentPageScreenshotPlugin().apply(hooks)
// new PeriodPushCurrentPageScreenshotPlugin().apply(hooks)
new UserResponseInfoPlugin().apply(hooks)
}

View File

@@ -52,29 +52,29 @@ export const pageMapByName: {
boss?: Page | null
} = {}
async function periodPushCurrentPageScreenshot () {
try {
if (pageMapByName.boss?.isClosed()) {
return
}
const shouldExit = await checkShouldExit()
if (shouldExit) {
return
}
try {
await pushCurrentPageScreenshot(pageMapByName.boss)
}
catch (err) {
if (err?.message?.includes(`PAGE_CLOSED`)) {
return
}
}
setTimeout(periodPushCurrentPageScreenshot, SCREENSHOT_INTERVAL_MS)
}
catch {}
}
// async function periodPushCurrentPageScreenshot () {
// try {
// if (pageMapByName.boss?.isClosed()) {
// return
// }
// const shouldExit = await checkShouldExit()
// if (shouldExit) {
// return
// }
// try {
// await pushCurrentPageScreenshot(pageMapByName.boss)
// }
// catch (err) {
// if (err?.message?.includes(`PAGE_CLOSED`)) {
// return
// }
// }
// setTimeout(periodPushCurrentPageScreenshot, SCREENSHOT_INTERVAL_MS)
// }
// catch {}
// }
periodPushCurrentPageScreenshot()
// periodPushCurrentPageScreenshot()
async function saveCurrentChatRecord(page) {
const userInfo = await page.evaluate(