11const df = require ( 'durable-functions' )
22
3- module . exports = df . orchestrator ( function * ( context ) {
3+ module . exports = df . orchestrator ( function * ( context ) {
44 // retrieves the organization name from the Orchestrator_HttpStart function
5- var organizationName = context . df . getInput ( )
5+ var organizationName = context . df . getInput ( ) ;
6+
67 // retrieves the list of repositories for an organization by invoking a separate Activity Function.
7- var repositories = yield context . df . callActivityAsync (
8- 'GetAllRepositoriesForOrganization' ,
9- organizationName
10- )
8+ var repositories = yield context . df . callActivity ( 'GetAllRepositoriesForOrganization' , organizationName ) ;
119
1210 // Creates an array of task to store the result of each functions
1311 var output = [ ]
1412 for ( var i = 0 ; i < repositories . length ; i ++ ) {
1513 // Starting a `GetOpenedIssues` activity WITHOUT `yield`
1614 // This will starts Activity Functions in parallel instead of sequentially.
1715 output . push (
18- context . df . callActivityAsync ( 'GetOpenedIssues' , repositories [ i ] )
16+ context . df . callActivity ( 'GetOpenedIssues' , repositories [ i ] )
1917 )
2018 }
2119
2220 // Wait for all Activity Functions to complete execution
2321 const results = yield context . df . Task . all ( output )
2422
2523 // Send the list to an Activity Function to save them to Blob Storage.
26- yield context . df . callActivityAsync ( 'SaveRepositories' , results )
24+ yield context . df . callActivity ( 'SaveRepositories' , results )
2725
2826 return context . instanceId
29- } )
27+ } )
0 commit comments