mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-06-01 13:40:35 +08:00
remove period screenshot
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user