UNPKG

@apify/n8n-nodes-apify

Version:
22 lines 1.89 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.properties = exports.option = exports.name = void 0; const properties_1 = require("./properties"); const hooks_1 = require("./hooks"); exports.name = 'Run task synchronously (POST)'; const rawOption = { name: 'Run Task Synchronously (POST)', value: 'Run task synchronously (POST)', action: 'Run task synchronously (POST)', description: 'Runs an actor task and synchronously returns its output The run must finish in 300 seconds otherwise the HTTP request fails with a timeout error this won t abort the run itself Optionally you can override the actor input configuration by passing a JSON object as the POST payload and setting the Content Type application JSON HTTP header Note that if the object in the POST payload does not define a particular input property the actor run uses the default value defined by the task or actor s input schema if not defined by the task Beware that it might be impossible to maintain an idle HTTP connection for an extended period due to client timeout or network conditions Make sure your HTTP client is configured to have a long enough connection timeout If the connection breaks you will not receive any information about the run and its status Input fields from actor task configuration can be overloaded with values passed as the POST payload Just make sure to specify Content Type header to be application JSON and input to be an object To run the task asynchronously use the Run task API endpoint instead', routing: { request: { method: 'POST', url: '=/v2/actor-tasks/{{$parameter["actorTaskId"]}}/run-sync', }, }, }; const { properties, option } = (0, hooks_1.runHooks)(rawOption, properties_1.properties); exports.properties = properties; exports.option = option; //# sourceMappingURL=index.js.map