Return the whole job
Limit number of retry attempts
Extract functions
Read max_retry_attempts from Configuration
Limit number of retry attempts by worker
Fix so job state is updated