fix(results): send WhatsApp result summaries when the scheduler stores a draw
This commit is contained in:
parent
e76e931c3c
commit
bf27fdb767
@ -3,6 +3,7 @@ import { loadConfig } from './config';
|
|||||||
import { openDb } from './db';
|
import { openDb } from './db';
|
||||||
import { runMigrations } from './db/migrate';
|
import { runMigrations } from './db/migrate';
|
||||||
import { createResultsScheduler } from './results/scheduler';
|
import { createResultsScheduler } from './results/scheduler';
|
||||||
|
import { sendDrawResults } from './results/sendResults';
|
||||||
import { createVisionReader } from './transcribe/transcribeImage';
|
import { createVisionReader } from './transcribe/transcribeImage';
|
||||||
import { createBridge } from './whatsapp/bridge';
|
import { createBridge } from './whatsapp/bridge';
|
||||||
import { createPhotoQueue } from './whatsapp/photoQueue';
|
import { createPhotoQueue } from './whatsapp/photoQueue';
|
||||||
@ -34,6 +35,7 @@ async function main(): Promise<void> {
|
|||||||
const stopScheduler = createResultsScheduler({
|
const stopScheduler = createResultsScheduler({
|
||||||
db,
|
db,
|
||||||
log: (e) => app.log.info(e),
|
log: (e) => app.log.info(e),
|
||||||
|
onStored: (drawCode) => void sendDrawResults(db, sendQueue, drawCode, (e) => app.log.info(e)),
|
||||||
...config.results,
|
...config.results,
|
||||||
}).start();
|
}).start();
|
||||||
const stopSweeper = createConversationSweeper({
|
const stopSweeper = createConversationSweeper({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user