Skip to content

Commit

Permalink
fix: cheo updated
Browse files Browse the repository at this point in the history
  • Loading branch information
scientiststwin committed Feb 22, 2024
1 parent 412f3d6 commit b2c2312
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
7 changes: 0 additions & 7 deletions src/saga/choreography.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
TWITTER_REFRESH_TRANSACTIONS,
ANNOUNCEMENT_SEND_MESSAGE_TO_USER_TRANSACTIONS,
ANNOUNCEMENT_SEND_MESSAGE_TO_CHANNEL_TRANSACTIONS,
ANNOUNCEMENT_SAFETY_MESSAGE_TRANSACTIONS
} from './transaction';

/* define the DISCORD_UPDATE_CHANNELS choreography */
Expand Down Expand Up @@ -41,11 +40,6 @@ const ANNOUNCEMENT_SEND_MESSAGE_TO_CHANNEL: IChoreography = {
transactions: ANNOUNCEMENT_SEND_MESSAGE_TO_CHANNEL_TRANSACTIONS
}

const ANNOUNCEMENT_SAFETY_MESSAGE: IChoreography = {
name: 'ANNOUNCEMENT_SAFETY_MESSAGE',
transactions: ANNOUNCEMENT_SAFETY_MESSAGE_TRANSACTIONS
}

/* all available Choreographies, will grow overtime */
export const ChoreographyDict = {
DISCORD_UPDATE_CHANNELS,
Expand All @@ -58,6 +52,5 @@ export const ChoreographyDict = {
// Announcement
ANNOUNCEMENT_SEND_MESSAGE_TO_USER,
ANNOUNCEMENT_SEND_MESSAGE_TO_CHANNEL,
ANNOUNCEMENT_SAFETY_MESSAGE

} as const;
23 changes: 13 additions & 10 deletions src/saga/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,21 @@ export const TWITTER_REFRESH_TRANSACTIONS: ITransaction[] = [
export const ANNOUNCEMENT_SEND_MESSAGE_TO_USER_TRANSACTIONS: ITransaction[] = [
{
queue: Queue.DISCORD_BOT,
event: Event.DISCORD_BOT.SEND_MESSAGE,
event: Event.DISCORD_BOT.SEND_MESSAGE_TO_CHANNEL,
order: 1,
...DEFAULT_TRANSACTION_PROPERTY,
},
{
queue: Queue.SERVER_API,
event: Event.SERVER_API.ANNOUNCEMENT_SAFETY_MESSAGE,
order: 2,
...DEFAULT_TRANSACTION_PROPERTY,
},
{
queue: Queue.DISCORD_BOT,
event: Event.DISCORD_BOT.SEND_MESSAGE,
order: 3,
...DEFAULT_TRANSACTION_PROPERTY,
}
]

Expand All @@ -100,12 +112,3 @@ export const ANNOUNCEMENT_SEND_MESSAGE_TO_CHANNEL_TRANSACTIONS: ITransaction[] =
...DEFAULT_TRANSACTION_PROPERTY,
}
]

export const ANNOUNCEMENT_SAFETY_MESSAGE_TRANSACTIONS: ITransaction[] = [
{
queue: Queue.SERVER_API,
event: Event.SERVER_API.ANNOUNCEMENT_SAFETY_MESSAGE,
order: 1,
...DEFAULT_TRANSACTION_PROPERTY,
}
]

0 comments on commit b2c2312

Please sign in to comment.