From: Josh Durgin Date: Fri, 25 Oct 2013 20:01:55 +0000 (-0700) Subject: worker: use the full op_id when waiting X-Git-Tag: v1.1~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=198608f72003fa4205bca22d05d0696d0cee885c;p=radosgw-agent.git 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 --- 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']