From: Jérôme Benoit Date: Sun, 17 Sep 2023 20:47:48 +0000 (+0200) Subject: Merge branch 'master' into feature/task-functions X-Git-Tag: v2.7.0~1^2~18 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=29dc485a322ff057eea10d8b874b6f292bda7ff5;p=poolifier.git Merge branch 'master' into feature/task-functions --- 29dc485a322ff057eea10d8b874b6f292bda7ff5 diff --cc docs/api.md index d2cc2ba7,df7d1ce5..15760676 --- a/docs/api.md +++ b/docs/api.md @@@ -152,29 -146,29 +152,29 @@@ An object with these properties #### `YourWorker.hasTaskFunction(name)` - `name` (mandatory) The task function name + `name` (mandatory) The task function name. -This method is available on both worker implementations and returns a boolean. +This method is available on both worker implementations and returns `{ status: boolean, error?: Error }`. #### `YourWorker.addTaskFunction(name, fn)` - `name` (mandatory) The task function name - `fn` (mandatory) The task function + `name` (mandatory) The task function name. + `fn` (mandatory) The task function. -This method is available on both worker implementations and returns a boolean. +This method is available on both worker implementations and returns `{ status: boolean, error?: Error }`. #### `YourWorker.removeTaskFunction(name)` - `name` (mandatory) The task function name + `name` (mandatory) The task function name. -This method is available on both worker implementations and returns a boolean. +This method is available on both worker implementations and returns `{ status: boolean, error?: Error }`. -#### `YourWorker.listTaskFunctions()` +#### `YourWorker.listTaskFunctionNames()` This method is available on both worker implementations and returns an array of the task function names. #### `YourWorker.setDefaultTaskFunction(name)` - `name` (mandatory) The task function name + `name` (mandatory) The task function name. -This method is available on both worker implementations and returns a boolean. +This method is available on both worker implementations and returns `{ status: boolean, error?: Error }`.