Synchronizer

Synchronizer

Module that keeps the database synchronized with the CS Module that updates the RSS database ( ResourceStatusDB ) with the information in the Resources section. If there are additions in the CS, those are incorporated to the DB. If there are deletions, entries in RSS tables for those elements are deleted ( except the Logs table ).

class DIRAC.ResourceStatusSystem.Utilities.Synchronizer.Synchronizer(rStatus=None, rManagement=None, defaultStatus='Unknown')

Bases: object

Every time there is a successful write on the CS, Synchronizer().sync() is executed. It updates the database with the values on the CS.

__init__(rStatus=None, rManagement=None, defaultStatus='Unknown')
sync(_eventName, _params)

Main synchronizer method. It synchronizes the three types of elements: Sites, Resources and Nodes. Each _syncX method returns a dictionary with the additions and deletions.

Examples

>>> s.sync( None, None )
    S_OK()
Parameters:
_eventName - any

this parameter is ignored, but needed by caller function.

_params - any

this parameter is ignored, but needed by caller function.

Returns:

S_OK