From 9dc3ddb9797de2d13b68d14f9ee912be1236cf95 Mon Sep 17 00:00:00 2001 From: Gagan Deep Date: Mon, 25 Nov 2024 17:28:51 +0530 Subject: [PATCH] [change!] Updated openwisp2_radius_delete_old_radiusbatch_users #500 Updated "openwisp2_radius_delete_old_radiusbatch_users" to set number of days instead of number of months. Closes #500 --- defaults/main.yml | 2 +- templates/openwisp2/settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index b8832ec3..8803d294 100755 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -161,7 +161,7 @@ openwisp2_users_user_password_expiration: 0 openwisp2_users_staff_user_password_expiration: 0 openwisp2_radius_sms_backend: "sendsms.backends.console.SmsBackend" openwisp2_radius_sms_token_max_ip_daily: 25 -openwisp2_radius_delete_old_radiusbatch_users: 12 +openwisp2_radius_delete_old_radiusbatch_users: 365 openwisp2_radius_cleanup_stale_radacct: 1 openwisp2_radius_delete_old_postauth: 365 openwisp2_radius_delete_old_radacct: 365 diff --git a/templates/openwisp2/settings.py b/templates/openwisp2/settings.py index 32b0f2ca..fab6bb95 100644 --- a/templates/openwisp2/settings.py +++ b/templates/openwisp2/settings.py @@ -285,7 +285,7 @@ 'delete_old_radiusbatch_users': { 'task': 'openwisp_radius.tasks.delete_old_radiusbatch_users', 'schedule': crontab(**{ {{ cron_delete_old_radiusbatch_users }} }), - 'args': [{{ openwisp2_radius_delete_old_radiusbatch_users }}], + 'kwargs': {'older_than_days': {{ openwisp2_radius_delete_old_radiusbatch_users }}}, 'relative': True, }, 'cleanup_stale_radacct': {