We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66a85e0 commit 783fb70Copy full SHA for 783fb70
src/index.ts
@@ -517,14 +517,11 @@ export default class StepFunctionsOfflinePlugin implements Plugin {
517
// works with parameter: seconds, timestamp, timestampPath, secondsPath;
518
return {
519
waitState: true,
520
- f: event => {
+ f: async event => {
521
const waitTimer = this._waitState(event, currentState, stateName);
522
this.cliLog(`Wait function ${stateName} - please wait ${waitTimer} seconds`);
523
- return (arg1, arg2, cb) => {
524
- setTimeout(() => {
525
- cb(null, event);
526
- }, waitTimer * 1000);
527
- };
+ await delay(waitTimer);
+ return (e, context, done) => done(null, e || event);
528
},
529
};
530
}
0 commit comments