docs: fixed typo in onSuccess (#9096)

Changed `if the task fails` to `if the task succeeds`
This commit is contained in:
Nathan Clevenger
2024-11-10 01:23:32 -06:00
committed by GitHub
parent e3172f1e39
commit b86594f3f9

View File

@@ -43,7 +43,7 @@ Simply add a task to the `jobs.tasks` array in your Payload config. A task consi
| `outputSchema` | Define the output field schema - payload will generate a type for this schema. | | `outputSchema` | Define the output field schema - payload will generate a type for this schema. |
| `label` | Define a human-friendly label for this task. | | `label` | Define a human-friendly label for this task. |
| `onFail` | Function to be executed if the task fails. | | `onFail` | Function to be executed if the task fails. |
| `onSuccess` | Function to be executed if the task fails. | | `onSuccess` | Function to be executed if the task succeeds. |
| `retries` | Specify the number of times that this step should be retried if it fails. | | `retries` | Specify the number of times that this step should be retried if it fails. |
The logic for the Task is defined in the `handler` - which can be defined as a function, or a path to a function. The `handler` will run once a worker picks picks up a Job that includes this task. The logic for the Task is defined in the `handler` - which can be defined as a function, or a path to a function. The `handler` will run once a worker picks picks up a Job that includes this task.