mirror of
https://github.com/dkmstr/openuds.git
synced 2025-08-24 09:49:52 +03:00
Small fix for actor timeout detection on centos 7
This commit is contained in:
@ -232,7 +232,8 @@ def getIdleDuration():
|
|||||||
info = xss.XScreenSaverAllocInfo()
|
info = xss.XScreenSaverAllocInfo()
|
||||||
xss.XScreenSaverQueryInfo(display, xlib.XDefaultRootWindow(display), info)
|
xss.XScreenSaverQueryInfo(display, xlib.XDefaultRootWindow(display), info)
|
||||||
|
|
||||||
if info.contents.state != 0:
|
# Centos seems to set state to 1?? (weird, but it's happening don't know why... will try this way)
|
||||||
|
if info.contents.state != 0 and 'centos' not in platform.linux_distribution()[0].lower().strip():
|
||||||
return 3600 * 100 * 1000 # If screen saver is active, return a high enough value
|
return 3600 * 100 * 1000 # If screen saver is active, return a high enough value
|
||||||
|
|
||||||
return info.contents.idle / 1000.0
|
return info.contents.idle / 1000.0
|
||||||
|
Reference in New Issue
Block a user