INFRA-10659: Implement self-healing mechanism for Netbox jobs
1 unresolved thread
1 unresolved thread
Closes INFRA-10659
Merge request reports
Activity
Filter activity
requested review from @andersharrisson
assigned to @andersharrisson
- Resolved by Anders Harrisson
- Resolved by Anders Harrisson
39 # Remove the job from its current queue and re-add it with a delay 40 queue = Queue(job.origin, connection=job.connection) 41 queue.enqueue_in(timedelta(seconds=delay_seconds), job.func, *job.args, **job.kwargs, job_id=job.id, meta=job.meta) 42 43 logger.info(f"Job {job.id} rescheduled with delay of {delay_seconds} seconds for attempt {attempt}.") 44 except Exception as e: 45 logger.error(f"Failed to reschedule job {job.id}: {e}") 46 raise 47 48 def retry_on_failure(task_name): 49 """ 50 A decorator that retries a function if specific network-related exceptions occur. 51 It retries up to MAX_RETRIES times, and if all attempts fail, it raises an exception 52 so that Django RQ can mark the job as failed. 53 """ 54 def decorator(func): added 1 commit
- 7a1b248f - fix: adjust retry settings and remove InsecureRequestWarning suppression
mentioned in commit aab38df4
Please register or sign in to reply