the driver. file types supported are directories, symbolic links and regular files.
"""
def __init__(self, volume_client, tp_size, snapshot_clone_delay, clone_no_wait):
+ super(Cloner, self).__init__(volume_client, "cloner", tp_size)
+
self.vc = volume_client
self.snapshot_clone_delay = snapshot_clone_delay
self.snapshot_clone_no_wait = clone_no_wait
SubvolumeStates.STATE_FAILED : handle_clone_failed,
SubvolumeStates.STATE_CANCELED : handle_clone_failed,
}
- super(Cloner, self).__init__(volume_client, "cloner", tp_size)
def reconfigure_max_concurrent_clones(self, tp_size):
return super(Cloner, self).reconfigure_max_async_threads(tp_size)
MAX_RETRIES_ON_EXCEPTION = 10
def __init__(self, async_job, volume_client, name):
+ threading.Thread.__init__(self, name=name)
+
self.vc = volume_client
self.async_job = async_job
# event object to cancel jobs
self.cancel_event = threading.Event()
- threading.Thread.__init__(self, name=name)
def run(self):
retries = 0
def __init__(self, volume_client, name_pfx, nr_concurrent_jobs):
threading.Thread.__init__(self, name="{0}.tick".format(name_pfx))
+
self.vc = volume_client
# queue of volumes for starting async jobs
self.q = deque() # type: deque
_all_ threads purging entries for one volume (starving other volumes).
"""
def __init__(self, volume_client, tp_size):
- self.vc = volume_client
super(ThreadPoolPurgeQueueMixin, self).__init__(volume_client, "purgejob", tp_size)
+ self.vc = volume_client
+
def get_next_job(self, volname, running_jobs):
return get_trash_entry_for_volume(self.fs_client, self.vc.volspec, volname, running_jobs)