Ejemplo n.º 1
0
def initializeResourceStatusHandler( _serviceInfo ):
  '''
    Handler initialization, where we set the ResourceStatusDB as global db, and
    we instantiate the synchronizer.
  '''

  global db
  db = ResourceStatusDB()
  # Regenerates DB tables if needed
  db._checkTable()

  return S_OK()
Ejemplo n.º 2
0
def installDB():
  '''
    Installs Tables.
  '''
  
  db = ResourceStatusDB()
  return db._checkTable()
Ejemplo n.º 3
0
def installDB():
    '''
    Installs Tables.
  '''

    db1 = ResourceStatusDB()
    db2 = ResourceManagementDB()

    res1 = db1._checkTable()
    if not res1['OK']:
        subLogger.error(res1['Message'])
    elif res1['Value']:
        subLogger.info('ResourceStatusDB')
        subLogger.info(res1['Value'])

    res2 = db2._checkTable()
    if not res2['OK']:
        subLogger.error(res2['Message'])
    elif res2['Value']:
        subLogger.info('ResourceManagementDB')
        subLogger.info(res2['Value'])

    return S_OK()