Skip to content

Dev/andres&janier/v4.0 logout unused#171

Merged
dkmstr merged 2 commits into
v4.0from
dev/andres&janier/v4.0-logout-unused
May 5, 2026
Merged

Dev/andres&janier/v4.0 logout unused#171
dkmstr merged 2 commits into
v4.0from
dev/andres&janier/v4.0-logout-unused

Conversation

@aschumann-virtualcable
Copy link
Copy Markdown
Contributor

This pull request updates the way unused user services are handled for both Linux and Windows OS managers, as well as within the assigned unused worker. The main change is to replace direct service release calls with a more structured logout and release process, ensuring that the logout event is properly logged and that services are released in a way that supports pool caching if available.

Refactoring and behavior changes for unused service handling:

  • Both LinuxOsManager and WindowsOsManager now use osmanagers.OSManager.logged_out to log the logout event before releasing the service, instead of calling userservice.release() directly. This makes the logout process more explicit and consistent. [1] [2]
  • The release logic is now handled by UserServiceManager.manager().release_from_logout, which manages whether the service is returned to the cache or fully released, depending on pool configuration. [1] [2]
  • The assigned unused worker (assigned_unused.py) is updated to use the same logout and release flow, ensuring consistency across the codebase.

Logging and messaging improvements:

  • Updated log messages to indicate that services are being "released (logout)" rather than simply "removed," providing clearer context in logs. [1] [2] [3]

Imports and code organization:

  • Added imports for UserServiceManager and osmanagers in all affected files to support the new logout and release flow. [1] [2] [3]

Switches unused assigned service cleanup to use the dedicated logout and release flow, ensuring proper session handling and resource management. Updates log message for clarity.
Updates the user service cleanup process to use a unified logout and release mechanism, ensuring proper handling of cached and released resources when user services are unused for too long. This change enhances resource management consistency across OS managers.
@dkmstr dkmstr merged commit 4074941 into v4.0 May 5, 2026
2 checks passed
@aschumann-virtualcable aschumann-virtualcable deleted the dev/andres&janier/v4.0-logout-unused branch May 8, 2026 14:23
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.

2 participants