From 4214ec8abe244c9163b055b07f6fb38a35af7266 Mon Sep 17 00:00:00 2001 From: Miguel Prieto Date: Mon, 16 Dec 2024 12:09:54 -0300 Subject: [PATCH] Fix JavaScript example. No call to `manager.startPolling()` in the example used to showcase how to run workers with the TaskManager. --- docs/developer-guides/using-workers.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/developer-guides/using-workers.md b/docs/developer-guides/using-workers.md index 65d31f34..73938849 100644 --- a/docs/developer-guides/using-workers.md +++ b/docs/developer-guides/using-workers.md @@ -328,18 +328,19 @@ Import TaskRunner to run the JavaScript worker. ``` javascript import { - OrkesApiConfig, orkesConductorClient, - TaskRunner, + TaskManager, } from "@io-orkes/conductor-javascript"; -orkesConductorClient({ - keyId: process.env.CONDUCTOR_AUTH_KEY, - keySecret: process.env.CONDUCTOR_AUTH_SECRET, - serverUrl: process.env.CONDUCTOR_SERVER_URL, -}).then((client) => - new TaskManager(client, [ myWorker ]).startPolling() -); +const config = { + serverUrl: "https://developer.orkescloud.com/api", + keyId: "_CHANGE_ME_", + keySecret: "_CHANGE_ME_", +}; + +const client = await orkesConductorClient(config); +const manager = new TaskManager(client, [worker]); +manager.startPolling(); ```