swift: remove retrying code
This code became useless and bugged since we included LZ4 usage directly into the Swift driver. It was meant to retry if the data from Swift was null, not from lz4.loads(). So let's remove this. Change-Id: I555d1366974ba599c63c8aa4ce316fd3e4e91253
This commit is contained in:
@@ -21,7 +21,6 @@ import uuid
|
||||
import lz4
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
import retrying
|
||||
import six
|
||||
from six.moves.urllib.parse import quote
|
||||
try:
|
||||
@@ -69,10 +68,6 @@ OPTS = [
|
||||
]
|
||||
|
||||
|
||||
def retry_if_result_empty(result):
|
||||
return len(result) == 0
|
||||
|
||||
|
||||
class SwiftStorage(_carbonara.CarbonaraBasedStorage):
|
||||
|
||||
WRITE_FULL = True
|
||||
@@ -228,9 +223,6 @@ class SwiftStorage(_carbonara.CarbonaraBasedStorage):
|
||||
# Deleted in the meantime? Whatever.
|
||||
raise
|
||||
|
||||
@retrying.retry(stop_max_attempt_number=4,
|
||||
wait_fixed=500,
|
||||
retry_on_result=retry_if_result_empty)
|
||||
def _get_measures(self, metric, timestamp_key, aggregation, granularity,
|
||||
version=3):
|
||||
try:
|
||||
@@ -271,9 +263,6 @@ class SwiftStorage(_carbonara.CarbonaraBasedStorage):
|
||||
continue
|
||||
return keys
|
||||
|
||||
@retrying.retry(stop_max_attempt_number=4,
|
||||
wait_fixed=500,
|
||||
retry_on_result=retry_if_result_empty)
|
||||
def _get_unaggregated_timeserie(self, metric):
|
||||
try:
|
||||
headers, contents = self.swift.get_object(
|
||||
|
||||
Reference in New Issue
Block a user