Skip to content

Commit

Permalink
fix(store): cache timer mdw
Browse files Browse the repository at this point in the history
  • Loading branch information
neurosnap committed Dec 16, 2023
1 parent 2e4ab51 commit 7b1c7d5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions store/supervisor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ export function timer(timer: number = 5 * MINUTES) {
const map: { [key: string]: Task<unknown> } = {};

function* activate(action: ActionWPayload<CreateActionPayload>) {
yield* call(function* () {
return op(action);
});
yield* call(() => op(action));
yield* sleep(timer);
delete map[action.payload.key];
}
Expand Down

0 comments on commit 7b1c7d5

Please sign in to comment.