How to use the durable-functions.getClient function in durable-functions

To help you get started, we’ve selected a few durable-functions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github christiannwamba / calendar-app / serverless / schedule / index.js View on Github external
module.exports = async function (context, req) {
    const client = df.getClient(context);
    const instanceId = await client.startNew(req.params.functionName, undefined, req.body);

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

    return client.createCheckStatusResponse(context.bindingData.req, instanceId);
};
github Azure / azure-functions-durable-js / samples / HttpSyncStart / index.js View on Github external
module.exports = async function (context, req) {
    const client = df.getClient(context);
    const instanceId = await client.startNew(req.params.functionName, undefined, req.body);

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

    const timeoutInMilliseconds = getTimeInSeconds(req, timeout) || 30000;
    const retryIntervalInMilliseconds = getTimeInSeconds(req, retryInterval) || 1000;

    const response = client.waitForCompletionOrCreateCheckStatusResponse(
        context.bindingData.req,
        instanceId,
        timeoutInMilliseconds,
        retryIntervalInMilliseconds);
    return response;
};
github Azure / azure-functions-durable-extension / samples / javascript / HttpStart / index.js View on Github external
module.exports = async function (context, req) {
    const client = df.getClient(context);
    const instanceId = await client.startNew(req.params.functionName, undefined, req.body);

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

    return client.createCheckStatusResponse(context.bindingData.req, instanceId);
};
github Azure-Samples / durablefunctions-apiscraping-nodejs / FanOutFanInCrawler / Orchestrator_HttpStart / index.js View on Github external
module.exports = async function(context) {  
  
  const client = df.getClient(context);
  const instanceId = await client.startNew('Orchestrator',  undefined, 'Nuget');

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

  return client.createCheckStatusResponse(context.bindingData.req, instanceId);
}
github rcarmo / azure-durable-functions-node-blog-engine / triggerHandler / index.js View on Github external
module.exports = async function (context, srcBlob) {
    const client = df.getClient(context),
          name = context.bindingData.name,
          length = srcBlob.length;

    //context.log("name:", name, " size:", length);
    
    const instanceId = await client.startNew("renderPipeline", undefined, name);
    
    //context.log("orchestrator:", instanceId);

    return client.createCheckStatusResponse(name, instanceId)
};

durable-functions

Durable Functions library for Node.js Azure Functions

MIT
Latest version published 9 months ago

Package Health Score

81 / 100
Full package analysis