Skip to content

Commit

Permalink
Discriminate input from output in staging manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Nov 12, 2024
1 parent d7bb304 commit 5645a57
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pulsar/client/action_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,20 +536,24 @@ class JsonTransferAction(BaseAction):
def __init__(self, source, file_lister=None, url=None):
super().__init__(source, file_lister)
self.url = url
self._path = None
self._from_path = None
self._to_path = None

@classmethod
def from_dict(cls, action_dict):
return JsonTransferAction(source=action_dict["source"], url=action_dict["url"])

def write_to_path(self, path):
self._path = path
self._to_path = path

def write_from_path(self, pulsar_path: str):
self._path = pulsar_path
self._from_path = pulsar_path

def finalize(self):
return {"url": self.url, "path": self.path}
if self._to_path:
return {"url": self.url, "to_path": self._to_path}
else:
return {"url": self.url, "from_path": self._from_path}


class RemoteObjectStoreCopyAction(BaseAction):
Expand Down

0 comments on commit 5645a57

Please sign in to comment.