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 {
|
try {
|
||||||
const memory = JSON.parse(fs.readFileSync(MEMORY_PATH, 'utf-8'));
|
const memory = JSON.parse(fs.readFileSync(MEMORY_PATH, 'utf-8'));
|
||||||
const events = memory.events || [];
|
const events = memory.events || [];
|
||||||
|
const today = new Date().toISOString().slice(0, 10);
|
||||||
|
|
||||||
return events.some(e =>
|
return events.some(e =>
|
||||||
e.broadcast_id === broadcastId ||
|
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 {
|
} catch {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue