Skip to content

Commit

Permalink
[change] Changed the command #294
Browse files Browse the repository at this point in the history
Updated the command. Related to openwisp/openwisp-radius#502
Closes #294
  • Loading branch information
praptisharma28 committed Mar 12, 2024
1 parent efbda73 commit e52b3c1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/ENV.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ Any OpenWISP Configuration of type `string`. `int`, `bool` or `json` is supporte
- **Valid Values:** INT
- **Default:** 365

### `CRON_DELETE_OLD_USERS`
### `CRON_DELETE_OLD_RADIUSBATCH_USERS`

- **Explanation:** (Value in months) Deactivates expired user accounts which were created temporarily and have an expiration date set.
- **Valid Values:** INT
Expand Down
3 changes: 2 additions & 1 deletion images/common/openwisp/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def radius_tasks():
)
management.call_command("deactivate_expired_users")
management.call_command(
"delete_old_users", older_than_months=int(os.environ['CRON_DELETE_OLD_USERS'])
"delete_old_radiusbatch_users",
older_than_months=int(os.environ['CRON_DELETE_OLD_RADIUSBATCH_USERS']),
)


Expand Down
2 changes: 1 addition & 1 deletion images/openwisp_base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,4 @@ ENV DASHBOARD_APP_SERVICE=dashboard \
CRON_DELETE_OLD_RADACCT=365 \
CRON_DELETE_OLD_POSTAUTH=365 \
CRON_CLEANUP_STALE_RADACCT=365 \
CRON_DELETE_OLD_USERS=12
CRON_DELETE_OLD_RADIUSBATCH_USERS=12
2 changes: 1 addition & 1 deletion tests/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def test_celery(self):
"openwisp_radius.tasks.deactivate_expired_users",
"openwisp_radius.tasks.delete_old_postauth",
"openwisp_radius.tasks.delete_old_radacct",
"openwisp_radius.tasks.delete_old_users",
"openwisp_radius.tasks.delete_old_radiusbatch_users",
"openwisp_radius.tasks.delete_unverified_users",
"openwisp_radius.tasks.perform_change_of_authorization",
"openwisp_radius.tasks.send_login_email",
Expand Down

0 comments on commit e52b3c1

Please sign in to comment.