refactor: centralize notifications in core dispatch/completion functions (#150)
This commit is contained in:
@@ -18,7 +18,6 @@ import { log as auditLog } from "../audit.js";
|
||||
import { checkWorkerHealth, fetchGatewaySessions, type SessionLookup } from "./health.js";
|
||||
import { projectTick } from "./tick.js";
|
||||
import { createProvider } from "../providers/index.js";
|
||||
import { notifyTickPickups, getNotificationConfig } from "../notify.js";
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Types
|
||||
@@ -281,15 +280,7 @@ export async function tick(opts: {
|
||||
result.totalPickups += tickResult.pickups.length;
|
||||
result.totalSkipped += tickResult.skipped.length;
|
||||
|
||||
// Notify project group about any pickups
|
||||
if (tickResult.pickups.length > 0) {
|
||||
const notifyConfig = getNotificationConfig(pluginConfig);
|
||||
await notifyTickPickups(tickResult.pickups, {
|
||||
workspaceDir,
|
||||
config: notifyConfig,
|
||||
channel: project.channel,
|
||||
});
|
||||
}
|
||||
// Notifications now handled by dispatchTask
|
||||
if (isProjectActive || tickResult.pickups.length > 0) activeProjects++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user