MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / saveDailyHistory

Method saveDailyHistory

autorepeat/autorepeat.ts:381–390  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

379 }
380 await this.cache.saveData({
381 daily_history: historyObj,
382 last_day_check: this.lastDayCheck
383 });
384 }
385
386 private static maintenance(now: number) {
387 // 每分钟清理一次过期消息
388 if (now - this.lastCleanup > 60) {
389 for (const [gid, msgs] of this.recentMessages) {
390 const valid = msgs.filter(m => now - m.time <= this.triggerConfig.timeWindow);
391 if (valid.length === 0) {
392 this.recentMessages.delete(gid);
393 } else {

Callers 2

tryRepeatMethod · 0.95
maintenanceMethod · 0.95

Calls 1

saveDataMethod · 0.80

Tested by

no test coverage detected