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

[#183342339] Merge and combine latest django-cron changes #1

Merged
merged 115 commits into from
Sep 27, 2022

Conversation

GitTiago
Copy link

@GitTiago GitTiago commented Sep 23, 2022

Combine Housekeep authored migrations and tests with latest django-cron changes

Paul J Stevens and others added 30 commits March 25, 2016 16:20
No need to write to, or unlink the lock file. Rely on kernel-level
file locking mechanisms (fcntl) instead. The lock will be held for the duration
of the process.

Locking will always fail if another process has locked the file. Unlocking
can be done explicitely, but will also always happen implicitly at process
termination.
Update sample_cron_configurations.rst
Fixed typo in sample_cron_configurations.rst
It is possible for the running lock date in the cache to be None if
another process released the lock before the current process fetched
the value from the cache.
Prevent AttributeError when lock date is None.
Send mail when more than minimum of failures
(docs) Tiny grammar fixes in README and introduction
+ URL include fix
+ Test Settings template context processor fix
+ Exclude Python 2.7 / Django 2.0 combination from tests
JedrzejMaluszczak and others added 22 commits May 30, 2022 16:58
This parameter (schedule.run_tolerance_seconds) allows to run the job slightly earlier.

For example, consider a job that runs every 5 minutes and last time it was run at 00:00:00. For example, runcrons command
gets called every five minutes starting from 00:00:00.

Without this parameter, the job will be run next time at 00:10:00.

If run_tolerance_seconds is set to non-zero value, the job will be run next time at 00:05:00. That makes job run period
more precise.

By default, run_tolerance_seconds is 0, so this does not affect existing jobs.
…-from-checking-if-cron-should-run

Issue/80 exclude future dates from checking if cron should run
Fix migrations
There is no Django 4 compatible django-common-helpers and it is still used in django_cron.cron.FailedRunsNotificationCronJob
@GitTiago GitTiago force-pushed the feature/django3-cron-183342339 branch from 9cd1fe6 to 349dbe7 Compare September 26, 2022 16:25
@GitTiago GitTiago force-pushed the feature/django3-cron-183342339 branch from 349dbe7 to 46a040c Compare September 26, 2022 16:28
Copy link

@horthbynorthwest horthbynorthwest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got some questions (which I don't think are about your work, but potentially impact the tests)

Will practically test now and circle back

max-parallel: 4
matrix:
python-version: [3.7, 3.8, 3.9]
django_version: [<3, <4]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we're not specifying 2.2 here? 🤔

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really it's usually equivalent, when you specify <3 it install the latest version under version 3, i.e 2.2.X whatever is in vogue

Comment on lines +22 to +23
- python: "3.7"
env: DJANGO=2.0.* DJANGO_SETTINGS_MODULE='settings_sqllite'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably we don't need to update this to include every single combination, right? Shouldn't this be the LTS version of 2.2 over 2.0?

Also I notice there doesn't seem to be a Django 3 and postgres settings set up? Should there be?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

travis tests is not used. It was migrated from travis to Github actions

@@ -87,7 +162,7 @@ is set to run on each ``runcrons`` task, and the default process is to email
all the users specified in the ``ADMINS`` settings list when a job fails more
than 10 times in a row.

Install required dependencies: ``Django>=1.7.0``, ``django-common>=0.5.1``.
Install required dependencies: ``Django>=3.2.0``.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this run the risk of installing a higher version of django than we want?

mysqlclient==1.3.6
psycopg2==2.6
psycopg2==2.9.3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mysqlclient gets removed here - but the travis file mentions set up with sql settings - am I missing something here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis file is no used unfortunately

Copy link

@horthbynorthwest horthbynorthwest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦭 🚀

@GitTiago GitTiago merged commit ef8c909 into master Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.