fix: ensure jobs do not retry indefinitely by default, fix undefined values in error messages
Fix default retries
By default, if no retries property has been set, jobs / tasks should not be retried. This was not the case previously, as the maxRetries variable was undefined, causing jobs to retry endlessly. This PR sets them to 0 by default.
Additionally, this will make it so the workflow retries property always takes precedence over the task retries property. If a workflow does not have retries set (= 0), the job will NEVER retry, even if all individual tasks have retries set.
Fix error messages
Previously, you were able to encounter error messages with undefined values like these:
Reason is that it was always using job.workflowSlug for the error messages. However, if you queue a task directly, without a workflow, job.workflowSlug is undefined and job.taskSlug should be used instead.
This PR then gets rid of the second undefined value by ensuring that `maxRetries´ is never undefined