]> git-server-git.apps.pok.os.sepia.ceph.com Git - radosgw-agent.git/commitdiff
worker: use the full op_id when waiting
authorJosh Durgin <josh.durgin@inktank.com>
Fri, 25 Oct 2013 20:01:55 +0000 (13:01 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Sat, 26 Oct 2013 01:31:51 +0000 (18:31 -0700)
self.op_id is just the last part of it. Get it from the caller
instead.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
radosgw_agent/worker.py

index 7b5b5104ebebaa4cac604cbcddf46601de8caee4..243ac458aa63b81376fd67752411014a8fbe05f8 100644 (file)
@@ -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']