Skip to content

Commit

Permalink
Merge pull request #38 from RnDAO/feature/36-update-choreography-disc…
Browse files Browse the repository at this point in the history
…ord_update_channel

Feature/36 update choreography discord update channel
  • Loading branch information
cyri113 authored Jun 15, 2023
2 parents 217f81c + 7b2c847 commit d403195
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion __tests__/unit/choreography.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('choreography exists', () => {

checkChoreography(ChoreographyDict.DISCORD_UPDATE_CHANNELS, {
choreographyName: "DISCORD_UPDATE_CHANNELS",
transactionsLength: 2
transactionsLength: 3
})

})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
12 changes: 7 additions & 5 deletions src/saga/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
// },
];
Expand All @@ -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,
},
];
Expand All @@ -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,
},
]

0 comments on commit d403195

Please sign in to comment.