Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow more job defaults' config to be passed #941

Closed
1 task done
Kenchir opened this issue Jul 18, 2024 · 0 comments
Closed
1 task done

Allow more job defaults' config to be passed #941

Kenchir opened this issue Jul 18, 2024 · 0 comments

Comments

@Kenchir
Copy link

Kenchir commented Jul 18, 2024

Things to check first

  • I have searched the existing issues and didn't find my feature already requested there

Feature description

Currently, BaseScheduler accepts job_defaults parameter. However, it only defaults to three configs being stored irregardless of any config passed.
This can be a bug or enhancement .

Use case

As below function- only 3 defaults are being stored.

def _configure(self, config):
        # Set general options
        self._logger = maybe_ref(config.pop('logger', None)) or getLogger('apscheduler.scheduler')
        self.timezone = astimezone(config.pop('timezone', None)) or get_localzone()
        self.jobstore_retry_interval = float(config.pop('jobstore_retry_interval', 10))
        
        # Set the job defaults
        job_defaults = config.get('job_defaults', {})
        self._job_defaults = {
            'misfire_grace_time': asint(job_defaults.get('misfire_grace_time', 1)),
            'coalesce': asbool(job_defaults.get('coalesce', True)),
            'max_instances': asint(job_defaults.get('max_instances', 1))
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant