From 198608f72003fa4205bca22d05d0696d0cee885c Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Fri, 25 Oct 2013 13:01:55 -0700 Subject: [PATCH] worker: use the full op_id when waiting self.op_id is just the last part of it. Get it from the caller instead. Signed-off-by: Josh Durgin --- radosgw_agent/worker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/radosgw_agent/worker.py b/radosgw_agent/worker.py index 7b5b510..243ac45 100644 --- a/radosgw_agent/worker.py +++ b/radosgw_agent/worker.py @@ -198,7 +198,7 @@ class DataWorker(Worker): except Exception as e: log.debug('exception during sync: %s', e) if found: - self.wait_for_object(bucket, obj, until) + self.wait_for_object(bucket, obj, until, local_op_id) # TODO: clean up old op states try: client.remove_op_state(self.dest_conn, self.daemon_id, local_op_id, @@ -207,12 +207,12 @@ class DataWorker(Worker): log.exception('could not remove op state for daemon "%s" op_id %s', self.daemon_id, local_op_id) - def wait_for_object(self, bucket, obj, until): + def wait_for_object(self, bucket, obj, until, local_op_id): while time.time() < until: try: state = client.get_op_state(self.dest_conn, self.daemon_id, - self.op_id, + local_op_id, bucket, obj) log.debug('op state is %s', state) state = state[0]['state'] -- 2.47.3