def _cleanup_download_job(self, retries, attempt=1):
        log.info('cleanup-download', name=self.name,
                 profile=self._download_job_name,
                 attempt=attempt, remaining=retries)

        if self._download_job_name is not None:
            try:
                job = self.delete_download_job_xml
                yield self._handler.netconf_client.edit_config(job)
                self._download_job_name = None

            except Exception as e:
                log.exception(e.message)
                if retries > 0:
                    reactor.callLater(attempt * 60, self._cleanup_download_job,
                                      retries - 1, attempt + 1)