def get_run_params(self) -> Dict:
        """Return the params to run the celery task."""
        params = {}
        if self.celery_queue:
            params['queue'] = self.celery_queue

        if self.timeout:
            params['soft_time_limit'] = self.timeout
            # We set also a hard time limit that will send sig 9
            # This hard time limit should not happened, as it will set inconsistent state
            params['time_limit'] = self.timeout + settings.CELERY_HARD_TIME_LIMIT_DELAY

        if self.execute_at:
            params['eta'] = self.execute_at

        return params
def get_run_params ( self ) -> Dict : params = { } if self . celery_queue : params [ 'queue' ] = self . celery_queue if self . timeout : params [ 'soft_time_limit' ] = self . timeout params [ 'time_limit' ] = self . timeout + settings . CELERY_HARD_TIME_LIMIT_DELAY if self . execute_at : params [ 'eta' ] = self . execute_at return params
Return the params to run the celery task.