'Initializes StatsStore and StatsStoreWorker.'

def RunOnce(self):

    token = access_control.ACLToken(username='GRRStatsStore').SetUID()
    global STATS_STORE
    STATS_STORE = aff4.FACTORY.Create(None, StatsStore, mode='w', token=token)
    try:
        STATS_STORE.Flush()
    except access_control.UnauthorizedAccess:
        logging.info('Not    writing    aff4:/stats_store    due    to    lack    of    permissions.')
    stats_process_id = config.CONFIG['StatsStore.process_id']
    if (not stats_process_id):
        return
    stats_store_worker = StatsStoreWorker(STATS_STORE, stats_process_id)
    stats_store_worker.RunAsync()
