Merge pull request #57 from PR0M3TH3AN/agents/weekly/perf-deepdive-agent-11478179249338404241

perf: parallelize daily/weekly lock queries in list command
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-02-14 08:51:08 -05:00
commit 23ad1adafb
6 files changed
+148 -2

No files matched your search

+7 -2
View File
@@ -439,9 +439,14 @@ export async function cmdList(cadence) {
console.error(`Listing active locks: namespace=${namespace}, cadences=${cadences.join(', ')}`);
for (const c of cadences) {
const locks = await queryLocks(relays, c, dateStr, namespace);
const results = await Promise.all(
cadences.map(async (c) => {
const locks = await queryLocks(relays, c, dateStr, namespace);
return { c, locks };
}),
);
for (const { c, locks } of results) {
console.log(`\n${'='.repeat(72)}`);
console.log(`Active ${namespace} ${c} locks (${dateStr})`);
console.log('='.repeat(72));