Skip to content

[change] Decoupled expired-user deactivation from USE_OPENWISP_RADIUS…#626

Open
CodingWithSaksham wants to merge 1 commit into
openwisp:masterfrom
CodingWithSaksham:issues/587-celery-deactivation
Open

[change] Decoupled expired-user deactivation from USE_OPENWISP_RADIUS…#626
CodingWithSaksham wants to merge 1 commit into
openwisp:masterfrom
CodingWithSaksham:issues/587-celery-deactivation

Conversation

@CodingWithSaksham
Copy link
Copy Markdown
Contributor

@CodingWithSaksham CodingWithSaksham commented May 31, 2026

Scheduled openwisp_users.tasks.deactivate_expired_users and expiration_reminder_email always-on in the Celery beat schedule, so user expiry handling no longer depends on the RADIUS module being enabled. Removed the obsolete deactivate_expired_users management command called from radius_tasks().

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #587.

Description of Changes

  • images/common/openwisp/tasks.py: Removed the obsolete deactivate_expired_users management command call from radius_tasks() (the logic now lives in openwisp-users; radius 1.3 no longer ships it).
  • tests/runtests.py: Updated the test_celery registered-task assertions: dropped openwisp_radius.tasks.deactivate_expired_users and added the two openwisp_users.tasks.* tasks.
  • docs/user/settings.rst: Clarified CRON_DELETE_OLD_RADIUSBATCH_USERS (it deletes RADIUS batch users; expired-account deactivation is now handled by openwisp-users and no longer tied to USE_OPENWISP_RADIUS).
  • images/common/openwisp/celery.py: Added an always-on users_schedule to the beat schedule:
    • openwisp_users.tasks.deactivate_expired_users (daily, 00:01)
    • openwisp_users.tasks.expiration_reminder_email (daily, 00:05)

Currently blocked by #625

…penwisp#587

Scheduled openwisp_users.tasks.deactivate_expired_users and
expiration_reminder_email always-on in the Celery beat schedule, so user
expiry handling no longer depends on the RADIUS module being enabled. Removed
the obsolete deactivate_expired_users management command called from
radius_tasks().

Closes openwisp#587
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 31, 2026

Warning

Review limit reached

@CodingWithSaksham, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 13 minutes and 12 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e2d002c6-d280-404e-ad29-273968e4da04

📥 Commits

Reviewing files that changed from the base of the PR and between 8bf91c8 and 8d1b967.

📒 Files selected for processing (4)
  • docs/user/settings.rst
  • images/common/openwisp/celery.py
  • images/common/openwisp/tasks.py
  • tests/runtests.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

[chores] Update Celery beat schedule logic for user deactivation

1 participant