def _get_rq_job_by_id(self, rq_id: str) -> RQJob | None:
        """
        Get a RQJob by its ID from the queues.

        Args:
            rq_id (str): The ID of the RQJob to retrieve.

        Returns:
            Optional[RQJob]: The retrieved RQJob, or None if not found.
        """
        try:
            parsed_request_id, queue_name = RequestId.parse(rq_id, try_legacy_format=True)
            rq_id = parsed_request_id.render()
        except Exception:
            return None

        queue: DjangoRQ = django_rq.get_queue(queue_name)
        job: CustomRQJob | None = queue.fetch_job(rq_id)

        if job:
            job.parsed_id = parsed_request_id

        return job

        Get a RQJob by its ID from the queues.

        Args:
            rq_id (str): The ID of the RQJob to retrieve.

        Returns:
            Optional[RQJob]: The retrieved RQJob, or None if not found.
        
cvat/apps/redis_handler/views.py