Skip to content

Commit

Permalink
refactor target states
Browse files Browse the repository at this point in the history
  • Loading branch information
customcommander committed Oct 18, 2024
1 parent 11a616b commit 41aef02
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/lib-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,12 @@ export default function (definitions) {

const target = (name, impl) => impl && ({
[name]: {
entry: {
type: 'game-update',
params: {
fn: impl,
reply_to: id
}
},
on: {
'game.updated': {
target: 'idle',
actions: 'task-ack'
}
always: {
target: 'idle',
actions: [
{type: 'game-update', params: {fn: impl}},
{type: 'task-ack'}
]
}
}
});
Expand Down

0 comments on commit 41aef02

Please sign in to comment.