feat: watcher akislarini ve wscraper servis entegrasyonunu ekle
This commit is contained in:
@@ -2,6 +2,7 @@ import { Server } from "socket.io";
|
||||
import { EVENTS } from "./events";
|
||||
import { StatusSnapshot } from "../status/status.service";
|
||||
import { LoopJob, TimerLog, TimerSummary } from "../types";
|
||||
import { EnrichedWatcherItem, WatcherListItem, WatcherSummaryResponse } from "../watcher/watcher.types";
|
||||
|
||||
let io: Server | null = null;
|
||||
|
||||
@@ -41,3 +42,15 @@ export const emitTimerLog = (payload: TimerLog) => {
|
||||
export const emitTimerSummary = (payload: TimerSummary) => {
|
||||
io?.emit(EVENTS.TIMER_SUMMARY, payload);
|
||||
};
|
||||
|
||||
export const emitWatchersList = (payload: WatcherListItem[]) => {
|
||||
io?.emit(EVENTS.WATCHERS_LIST, payload);
|
||||
};
|
||||
|
||||
export const emitWatcherItems = (payload: EnrichedWatcherItem[]) => {
|
||||
io?.emit(EVENTS.WATCHER_ITEMS, payload);
|
||||
};
|
||||
|
||||
export const emitWatcherSummary = (payload: WatcherSummaryResponse) => {
|
||||
io?.emit(EVENTS.WATCHER_SUMMARY, payload);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user