def get_state(self, request): """ Get current hoster state for this user. :return: 'logged_in', 'logged_out', 'missing_permissions' or 'checking' if a check is currently running. """ session_data = self._get_session_data(request) state = session_data.setdefault('state', 'logged_out') if state == 'checking': task = AsyncResult(id=session_data.get('checking_progress_id')) if settings.CELERY_ALWAYS_EAGER: task.maybe_reraise() self._handle_checking_task(request, task, session_data) state = session_data['state'] return state
def requeue_subsequent_tasks(self, task_id): result = AsyncResult(task_id) if not result.ready(): self.retry() result.maybe_reraise() return result.get()
def requeue_subsequent_tasks(self, task_id): result = AsyncResult(task_id) if not result.ready(): self.retry() result.maybe_reraise() return result.get()