Move UI-related DjangoJobExecution.html_status out of model definition and in to the associated model admin definition.
Add help_text to model fields to document their use.
Remove unused code fragments.
Add Python type annotations.
Implement various Django best practices for QuerySet management and model instance creation / updates.
Drop DjangoJob.name field in favor of aligning with using APScheduler's id field. NOTE: please run your Django
migrations again - might take a while depending on the number of DjangoJobExecutions in your database.
Acquire a DB lock when updating DjangoJob or DjangoJobExecution instances. This should be safer for multi-threaded
usage.
Switch to using BigAutoField for DjangoJobExecution's primary keys. This should prevent running out of usable
ID's for deployments with a very large number of job executions in the database (Resolves #36).
Implement DjangoJob.shutdown() method to close database connection when scheduler is shut down.
jobstores.register_events has been deprecated and will be removed in a future release. Calling this method is no
longer necessary as the DjangoJobStore will automatically register for events that it cares about when the scheduler
is started.
Ensure that Django and APScheduler always use the same timezones when passing datetimes between the two.
Use the configured scheduler's locking mechanism to keep the creation of DjangoJobExecution in sync with APScheduler
events.
Update README on recommended usage, which includes using a BlockingScheduler with a custom Django management command
instead of running a BackgroundScheduler directly in a Django application.
Remove ignore_database_error decorator. All database errors will be raised so that users can decide on the best
course of action for their specific use case (Resolves #79).
Remove DjangoJobManager: users should be allowed to manage the DB connection themselves based on their
implementation-specific use case. See the official Django recommendations at: https://code.djangoproject.com/ticket/21597#comment:29.
Add AUTHORS file.
Increase test coverage.
Remove the DjangoJobExecution.started field. It appears that APScheduler only fires an event when the job is
submitted to the scheduler (not when job execution actually starts). We now calculate the job duration as the
elapsed time in seconds between the scheduled run_time and when we receive the events.EVENT_EXECUTED
APScheduler event.
Fixes
Fix PEP8 code formatting violations.
Implement locking mechanism to prevent duplicate DjangoJobExecutions from being created (Fixes #28, #30, #44).
DjangoJobStore.add_job now raises a ConflictingIdError if a job with that particular ID already exists in the job
store. This aligns with the behavior expected by the APScheduler interface. Use the replace_existing parameter to
Move UI-related DjangoJobExecution.html_status out of model definition and in to the associated model admin definition.
Add help_text to model fields to document their use.
Remove unused code fragments.
Add Python type annotations.
Implement various Django best practices for QuerySet management and model instance creation / updates.
Drop DjangoJob.name field in favor of aligning with using APScheduler's id field. NOTE: please run your Django
migrations again - might take a while depending on the number of DjangoJobExecutions in your database.
Acquire a DB lock when updating DjangoJob or DjangoJobExecution instances. This should be safer for multi-threaded
usage.
Switch to using BigAutoField for DjangoJobExecution's primary keys. This should prevent running out of usable
ID's for deployments with a very large number of job executions in the database (Resolves #36).
Implement DjangoJob.shutdown() method to close database connection when scheduler is shut down.
jobstores.register_events has been deprecated and will be removed in a future release. Calling this method is no
longer necessary as the DjangoJobStore will automatically register for events that it cares about when the scheduler
is started.
Ensure that Django and APScheduler always use the same timezones when passing datetimes between the two.
Use the configured scheduler's locking mechanism to keep the creation of DjangoJobExecution in sync with APScheduler
events.
Update README on recommended usage, which includes using a BlockingScheduler with a custom Django management command
instead of running a BackgroundScheduler directly in a Django application.
Remove ignore_database_error decorator. All database errors will be raised so that users can decide on the best
course of action for their specific use case (Resolves #79).
Remove DjangoJobManager: users should be allowed to manage the DB connection themselves based on their
implementation-specific use case. See the official Django recommendations at: https://code.djangoproject.com/ticket/21597#comment:29.
Add AUTHORS file.
Increase test coverage.
Remove the DjangoJobExecution.started field. It appears that APScheduler only fires an event when the job is
submitted to the scheduler (not when job execution actually starts). We now calculate the job duration as the
elapsed time in seconds between the scheduled run_time and when we receive the events.EVENT_EXECUTED
APScheduler event.
Fixes
Fix PEP8 code formatting violations.
Implement locking mechanism to prevent duplicate DjangoJobExecutions from being created (Fixes #28, #30, #44).
DjangoJobStore.add_job now raises a ConflictingIdError if a job with that particular ID already exists in the job
store. This aligns with the behavior expected by the APScheduler interface. Use the replace_existing parameter to
update existing jobs instead.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
Bumps django-apscheduler from 0.3.1 to 0.4.0.
Release notes
Sourced from django-apscheduler's releases.
Changelog
Sourced from django-apscheduler's changelog.
Commits
5882255
docs(changelog): Add historical changelog entries.63fcb88
fix(models): Don't log job execution timestamps until after job has been subm...cc56c5a
fix(devops): Remove unused coverage plugin.83b7b10
Merge pull request #91 from jcass77/enh/test_coverage6fc53e6
refactor(model): Don't calcDjangoJobExecution
duration on initial instance...b6a2331
migrations: Add missing migration.dea65d1
enh(tests): Increase test coverage and fix various small issues.62cf9ea
Merge branch 'upstream_master'9aebcd4
chore: Update manifest to include list of authors.aae1ab3
docs: Add links to changelog. Add AUTHORS file.Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired)