TornadoRefresher

class DIRAC.ConfigurationSystem.private.TornadoRefresher.TornadoRefresher

Bases: RefresherBase

The refresher, modified for Tornado It’s the same refresher, the only thing which change is that we are using the IOLoop instead of threads for background tasks, so it work with Tornado (HTTPS server).

__init__()
addListenerToNewVersionEvent(functor)
autoRefreshAndPublish(sURL)

Start the autorefresh background task, called by ServiceInterface (the class behind the Configuration/Server handler)

Parameters:

sURL (str) – URL of the configuration server

daemonize()

daemonize is probably not the best name because there is no daemon behind but we must keep it to the same interface of the DISET refresher

disable()

Disable the refresher and prevent any request to another server

enable()

Enable the refresher and authorize request to another server WARNING: It will not activate automatic updates, use autoRefreshAndPublish() for that

forceRefresh(fromMaster=False)

Force refresh WARNING: If refresher is disabled, force a refresh will do nothing

isEnabled()

Returns if you can use refresher or not, use automaticUpdateEnabled() to know if refresh is automatic.

refreshConfigurationIfNeeded()

Trigger an automatic refresh, most of the time nothing happens because automaticUpdate is enabled. This function is called by gConfig.getValue most of the time.

We disable pylint error because this class must be instanciated by a mixin to define the missing methods