diff --git a/__tests__/unit/choreography.test.ts b/__tests__/unit/choreography.test.ts index ac72631..f592246 100644 --- a/__tests__/unit/choreography.test.ts +++ b/__tests__/unit/choreography.test.ts @@ -20,7 +20,7 @@ describe('choreography exists', () => { checkChoreography(ChoreographyDict.DISCORD_UPDATE_CHANNELS, { choreographyName: "DISCORD_UPDATE_CHANNELS", - transactionsLength: 2 + transactionsLength: 3 }) }) diff --git a/package.json b/package.json index 92d0e9b..5bf4d3e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@togethercrew.dev/tc-messagebroker", - "version": "0.0.39", + "version": "0.0.40", "description": "a service that include common things that need in every microservies ", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/src/saga/transaction.ts b/src/saga/transaction.ts index 3a79aa7..36d3a47 100644 --- a/src/saga/transaction.ts +++ b/src/saga/transaction.ts @@ -2,6 +2,7 @@ import { Event, Queue, Status } from '../enums'; import { ITransaction } from '../interfaces/transaction.interface'; const DEFAULT_TRANSACTION_PROPERTY = { + status: Status.NOT_STARTED, message: undefined, start: undefined, end: undefined, @@ -14,21 +15,24 @@ export const DISCORD_UPDATE_CHANNELS_TRANSACTIONS: ITransaction[] = [ queue: Queue.DISCORD_BOT, event: Event.DISCORD_BOT.FETCH, order: 1, - status: Status.NOT_STARTED, ...DEFAULT_TRANSACTION_PROPERTY, }, { queue: Queue.DISCORD_ANALYZER, event: Event.DISCORD_ANALYZER.RUN, order: 2, - status: Status.NOT_STARTED, + ...DEFAULT_TRANSACTION_PROPERTY, + }, + { + queue: Queue.DISCORD_BOT, + event: Event.DISCORD_BOT.SEND_MESSAGE, + order: 3, ...DEFAULT_TRANSACTION_PROPERTY, }, // { TODO: reactivated later // queue: Queue.SERVER_API, // event: Event.SERVER_API.UPDATE_GUILD, // order: 3, - // status: Status.NOT_STARTED, // ...DEFAULT_TRANSACTION_PROPERTY, // }, ]; @@ -38,7 +42,6 @@ export const DISCORD_SCHEDULED_JOB_TRANSACTIONS: ITransaction[] = [ queue: Queue.DISCORD_ANALYZER, event: Event.DISCORD_ANALYZER.RUN_ONCE, order: 1, - status: Status.NOT_STARTED, ...DEFAULT_TRANSACTION_PROPERTY, }, ]; @@ -48,7 +51,6 @@ export const DISCORD_FETCH_MEMBERS_TRANSACTIONS: ITransaction[] = [ queue: Queue.DISCORD_BOT, event: Event.DISCORD_BOT.FETCH_MEMBERS, order: 1, - status: Status.NOT_STARTED, ...DEFAULT_TRANSACTION_PROPERTY, }, ] \ No newline at end of file