summaryrefslogtreecommitdiffstats
path: root/src/virtual/ogOperations.py
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-11-13 19:41:20 +0100
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-11-26 13:02:45 +0100
commita36c4daa23d32aeee9539374aa591152ef2c914b (patch)
treeb31459ed9704dfc0ba7e6e98a0514e0c6c068249 /src/virtual/ogOperations.py
parenta1bd0c36f3be137e908540e5ea50354fd9293ca3 (diff)
src: add user session detection implementation
Detect user login and logout for Linux and Windows. Report an active interactive session through the /refresh response so a new ogserver instance can update the session status. Poll the session change in 5 second intervals in a thread. Use the same event socket previously used by the old session detection mechanism to notify a session change. Use the method check_interactive_session_change in each ogOperations.py to report the session status. Return values: None: no session changes are found True: login False: logout Windows Verify if psutil.users() has any value. Linux Verify all the psutil.users() asociated to a terminal.
Diffstat (limited to 'src/virtual/ogOperations.py')
-rw-r--r--src/virtual/ogOperations.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/virtual/ogOperations.py b/src/virtual/ogOperations.py
index c51f59d..86ae0ed 100644
--- a/src/virtual/ogOperations.py
+++ b/src/virtual/ogOperations.py
@@ -629,3 +629,6 @@ class OgVirtualOperations:
for k, v in device_names.items():
f.write(f'{k}={v}\n')
f.truncate()
+
+ def check_interactive_session_change(self):
+ return None