Skip to content

Commit

Permalink
Fix JavaScript example. No call to manager.startPolling() in the ex…
Browse files Browse the repository at this point in the history
…ample used to showcase how to run workers with the TaskManager.
  • Loading branch information
jmigueprieto committed Dec 16, 2024
1 parent dbc62a8 commit 4214ec8
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions docs/developer-guides/using-workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
```
</TabItem>
Expand Down

0 comments on commit 4214ec8

Please sign in to comment.