You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
df.app.orchestration('queue_orchestrator',{handler: function*(context){constresponse: 'queue_empty'|'continue'|null=yieldcontext.df.callActivity('pop_queue');if(!response){// Activity failed retry in 1 minuteyieldcontext.df.createTimer(newDate(context.df.currentUtcDateTime.getTime()+1000*60));// 1 minute}elseif(response==='queue_empty'){// No more items in queue, wait for new itemsconsttimeoutTask=context.df.createTimer(newDate(context.df.currentUtcDateTime.getTime()+1000*60*60*5),);// 5 hoursconsthasQueueTask=context.df.waitForExternalEvent('has_queue');yieldcontext.df.Task.any([timeoutTask,hasQueueTask]);}context.df.continueAsNew(undefined);},});
After this code is run under function emulator 4.0.5455 on WIndows 11
I think there is a bug in context.df.Task.any that it leaves orchestrator in invalid state if waitForExternalEvent is first task to finish.
Investigative information
durable-functions npm module version: 3.0.1
Language (JavaScript/TypeScript) and version: 5.2.2
Node.js version: v18.18
Actual behavior
When using context.df.Task.any with context.df.createTimer & context.df.waitForExternalEvent and if context.df.waitForExternalEvent task finishes first orchestrator is left in invalid state and starts to receive old values from context.df.callActivity('pop_queue') without even calling the activity meaning code in the activity is never called.
The text was updated successfully, but these errors were encountered:
Describe the bug
I have this code
If I change code 1. to this everything works
I think there is a bug in context.df.Task.any that it leaves orchestrator in invalid state if waitForExternalEvent is first task to finish.
Investigative information
Actual behavior
When using context.df.Task.any with context.df.createTimer & context.df.waitForExternalEvent and if context.df.waitForExternalEvent task finishes first orchestrator is left in invalid state and starts to receive old values from context.df.callActivity('pop_queue') without even calling the activity meaning code in the activity is never called.
The text was updated successfully, but these errors were encountered: