import logging
log = logging.getLogger()
log.setLevel(logging.DEBUG)
format = "%(levelname)s:%(name)s: %(message)s"
formatter = logging.Formatter(format)
handler = logging.StreamHandler()
handler.setFormatter(formatter)
log.addHandler(handler)

from MetadataService.MasterService import MasterService

m = MasterService()
m.initialize_dbcluster()
m.initialize_index()

index = m.index

context = index.acquire_context()
volumes = context.root()["infospaces"]["filesystem"].volumes
context.begin_transaction()
for a in volumes.values(): a.fully_indexed = True

context.commit_transaction()
context.release()

m.close_index()
m.close_dbcluster()
