chore: plan execution layer status sync system
Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
This commit is contained in:
parent
e0d72b5844
commit
54805c2bd6
|
|
@ -97,9 +97,12 @@ function isDuplicate(broadcastId) {
|
|||
try {
|
||||
const memory = JSON.parse(fs.readFileSync(MEMORY_PATH, 'utf-8'));
|
||||
const events = memory.events || [];
|
||||
const today = new Date().toISOString().slice(0, 10);
|
||||
|
||||
return events.some(e =>
|
||||
e.broadcast_id === broadcastId ||
|
||||
(e.type === 'broadcast' && e.description === broadcastId)
|
||||
(e.type === 'broadcast' && e.description === broadcastId) ||
|
||||
(e.type === 'broadcast' && e.description === broadcastId && (e.date || '').startsWith(today))
|
||||
);
|
||||
} catch {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue