Skip to content

Commit

Permalink
Release 0.34.2
Browse files Browse the repository at this point in the history
Release 0.34.2
  • Loading branch information
resolve-bot authored Apr 19, 2022
2 parents 819f085 + 36ae241 commit 5fb70c7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,25 @@ export const sendReactiveEvent: ReactiveEventDispatcher = async (event) => {
({ connectionId }: { connectionId: string }) => connectionId
)

await invokeFunction({
Region: process.env.AWS_REGION as string,
FunctionName: process.env.RESOLVE_WEBSOCKET_LAMBDA_ARN as string,
InvocationType: 'RequestOnly',
MaximumExecutionDuration: 200,
Payload: {
type: 'send',
connectionIds,
data: {
type: 'events',
payload: {
events: [event],
if (connectionIds.length > 0) {
await invokeFunction({
Region: process.env.AWS_REGION as string,
FunctionName: process.env.RESOLVE_WEBSOCKET_LAMBDA_ARN as string,
InvocationType: 'Event',
Payload: {
type: 'send',
connectionIds,
data: {
type: 'events',
payload: {
events: [event],
},
},
},
},
}).catch(errorBoundary(errors))
}).catch(errorBoundary(errors))

if (errors.length > 0) {
log.warn(`Failed push event to websocket. ${errors}`)
if (errors.length > 0) {
log.warn(`Failed push event to websocket. ${errors}`)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ const commandExecutedHook = async (
command: Command,
storedEventPointer: StoredEventPointer
) => {
await runtime.broadcastEvent(storedEventPointer)
await runtime.sendReactiveEvent(storedEventPointer.event)
await Promise.all([
runtime.broadcastEvent(storedEventPointer),
runtime.sendReactiveEvent(storedEventPointer.event),
])
}

export const commandExecutedHookFactory = (
Expand Down

0 comments on commit 5fb70c7

Please sign in to comment.