Example #1
0
    def purge_all_local_worker_data(worker_name):
        """
        Removes worker's data and orders from local sqlite database.

        :param worker_name: Name of the worker to be removed
        """
        Storage.clear_worker_data(worker_name)
Example #2
0
def drop_state(worker_name):
    """Drop state of the worker (sqlite data)"""
    click.echo('Dropping state for {}'.format(worker_name))
    storage = Storage(worker_name)
    storage.clear_worker_data()
    time.sleep(1)
Example #3
0
def storage():
    worker_name = 'test_worker'
    yield Storage(worker_name)
    Storage.clear_worker_data(worker_name)