Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ freeradius_eap_openwisp_site_template_src: freeradius/eap/openwisp_site.j2
freeradius_eap_inner_tunnel_template_src: freeradius/eap/inner_tunnel.j2
freeradius_eap_template_src: freeradius/eap/eap.j2
cron_delete_old_notifications: "'hour': 0, 'minute': 0"
cron_deactivate_expired_users: "'hour': 0, 'minute': 5"
cron_deactivate_expired_users: "'hour': 0, 'minute': 1"
cron_expiration_reminder_email: "'hour': 0, 'minute': 3"
cron_delete_old_radiusbatch_users: "'hour': 0, 'minute': 10"
cron_cleanup_stale_radacct: "'hour': 0, 'minute': 20"
cron_delete_old_postauth: "'hour': 0, 'minute': 30"
Expand Down
3 changes: 2 additions & 1 deletion docs/user/role-variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,8 @@ take a look at `the default values of these variables
# Defaults to "templates/freeradius/eap/eap.j2" shipped in the role.
freeradius_eap_template_src: custom_eap.j2
cron_delete_old_notifications: "'hour': 0, 'minute': 0"
cron_deactivate_expired_users: "'hour': 0, 'minute': 5"
cron_expiration_reminder_email: "'hour': 0, 'minute': 3"
cron_deactivate_expired_users: "'hour': 0, 'minute': 1"
cron_delete_old_radiusbatch_users: "'hour': 0, 'minute': 10"
cron_cleanup_stale_radacct: "'hour': 0, 'minute': 20"
cron_delete_old_postauth: "'hour': 0, 'minute': 30"
Expand Down
16 changes: 10 additions & 6 deletions templates/openwisp2/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,14 @@
"schedule": crontab(**{ {{ cron_password_expiration_email }} }),
},
{% endif %}
"deactivate_expired_users": {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: The deactivate_expired_users task has been moved from openwisp_radius (conditional on openwisp2_radius and openwisp2_radius_periodic_tasks) to openwisp_users (always enabled). This changes behavior for non-RADIUS installations. Ensure this is intentional and that openwisp_users.tasks.deactivate_expired_users exists in all supported openwisp-users versions.

"task": "openwisp_users.tasks.deactivate_expired_users",
"schedule": crontab(**{ {{ cron_deactivate_expired_users }} }),
},
"expiration_reminder_email": {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: The expiration_reminder_email task runs unconditionally. Ensure openwisp_users.tasks.expiration_reminder_email exists in all supported openwisp-users versions, or wrap this in a conditional check similar to password_expiration_email above.

"task": "openwisp_users.tasks.expiration_reminder_email",
"schedule": crontab(**{ {{ cron_expiration_reminder_email }} }),
},
{% if openwisp2_notifications_delete_old_notifications %}
"delete_old_notifications": {
"task": "openwisp_notifications.tasks.delete_old_notifications",
Expand All @@ -267,12 +275,6 @@
},
{% endif %}
{% if openwisp2_radius and openwisp2_radius_periodic_tasks %}
"deactivate_expired_users": {
"task": "openwisp_radius.tasks.deactivate_expired_users",
"schedule": crontab(**{ {{ cron_deactivate_expired_users }} }),
"args": None,
"relative": True,
},
"delete_old_radiusbatch_users": {
"task": "openwisp_radius.tasks.delete_old_radiusbatch_users",
"schedule": crontab(**{ {{ cron_delete_old_radiusbatch_users }} }),
Expand Down Expand Up @@ -415,6 +417,8 @@

LANGUAGE_CODE = "{{ openwisp2_language_code }}"
TIME_ZONE = "{{ openwisp2_time_zone }}"
CELERY_TIMEZONE = TIME_ZONE

{% if openwisp2_internationalization %}
USE_I18N = True
{% endif %}
Expand Down
Loading