removed obsolete code
This commit is contained in:
parent
ac69a5c8e3
commit
4be125952d
@ -15,10 +15,9 @@ from pyinfra.server.packer.packers.rest import RestPacker
|
||||
from pyinfra.server.receiver.receivers.rest import RestReceiver
|
||||
from pyinfra.storage import storages
|
||||
from pyinfra.visitor import QueueVisitor
|
||||
from pyinfra.visitor.downloader import Downloader
|
||||
from pyinfra.visitor.response_formatter.formatters.default import DefaultResponseFormatter
|
||||
from pyinfra.visitor.response_formatter.formatters.identity import IdentityResponseFormatter
|
||||
from pyinfra.visitor.downloader import Downloader
|
||||
from pyinfra.visitor.strategies.blob_parsing.dynamic import DynamicParsingStrategy
|
||||
from pyinfra.visitor.strategies.response.aggregation import AggregationStorageStrategy
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -18,7 +18,6 @@ class StorageStrategy(ResponseStrategy):
|
||||
return body
|
||||
|
||||
def get_response_object_descriptor(self, body):
|
||||
"""TODO: refactor by using FileDescriptorManager"""
|
||||
return {
|
||||
"bucket_name": parse_disjunction_string(CONFIG.storage.bucket),
|
||||
"object_name": self.get_response_object_name(body),
|
||||
@ -26,13 +25,9 @@ class StorageStrategy(ResponseStrategy):
|
||||
|
||||
@staticmethod
|
||||
def get_response_object_name(body):
|
||||
"""TODO: refactor by using FileDescriptorManager"""
|
||||
|
||||
if "id" not in body:
|
||||
body["id"] = 0
|
||||
dossier_id, file_id = itemgetter("dossierId", "fileId")(body)
|
||||
|
||||
dossier_id, file_id, idnt = itemgetter("dossierId", "fileId", "id")(body)
|
||||
|
||||
object_name = f"{dossier_id}/{file_id}/id:{idnt}.{CONFIG.service.response_file_extension}"
|
||||
object_name = f"{dossier_id}/{file_id}/.{CONFIG.service.response_file_extension}"
|
||||
|
||||
return object_name
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user