Пример #1
0
def die_handler_indexer(signal, frame):
    """
    Handle Ctrl+C for indexer processe
    """
    
    db = get_state_engine()
    virtualchain.stop_sync_virtualchain( db )
    sys.exit(0)
Пример #2
0
        
        try:
           os.kill(pid, signal.SIGKILL)
        except Exception, e:
           return 

    
    if indexer_pid is not None:
        try:
           os.kill(indexer_pid, signal.SIGTERM)
        except Exception, e:
           return 
       
    # stop building new state if we're in the middle of it
    db = get_state_engine()
    virtualchain.stop_sync_virtualchain( db )
    
    set_indexing( False )
    
       
def get_indexing_lockfile():
    """
    Return path to the indexing lockfile 
    """
    return os.path.join( virtualchain.get_working_dir(), "blockstore.indexing" )
       
       
def is_indexing():
    """
    Is the blockstore daemon synchronizing with the blockchain?
    """