Merge "[Swift] Fix 503 error when get queue stats"

This commit is contained in:
Jenkins 2017-05-19 04:13:06 +00:00 committed by Gerrit Code Review
commit eb5d08e1ad

View File

@ -11,6 +11,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import copy
import functools import functools
import uuid import uuid
@ -346,7 +347,7 @@ class MessageQueueHandler(object):
'age': now - created, 'age': now - created,
'created': timeutils.iso8601_from_timestamp(created)} 'created': timeutils.iso8601_from_timestamp(created)}
if oldest is None: if oldest is None:
oldest = newest oldest = copy.deepcopy(newest)
total += 1 total += 1
if headers.get('x-object-meta-claimid'): if headers.get('x-object-meta-claimid'):
claimed += 1 claimed += 1