handler: async function()

in samples-js/functions/httpSyncStart.js [12:31]


    handler: async function (request, context) {
        const client = df.getClient(context);
        const body = await request.json();
        const instanceId = await client.startNew(request.params.orchestratorName, { input: body });

        context.log(`Started orchestration with ID = '${instanceId}'.`);

        const timeoutInMilliseconds = getTimeInMilliseconds(request, timeout) || 30000;
        const retryIntervalInMilliseconds = getTimeInMilliseconds(request, retryInterval) || 1000;

        const response = await client.waitForCompletionOrCreateCheckStatusResponse(
            request,
            instanceId,
            {
                timeoutInMilliseconds,
                retryIntervalInMilliseconds,
            }
        );
        return response;
    },