Skip to content

Commit

Permalink
Accepting process as a list
Browse files Browse the repository at this point in the history
  • Loading branch information
hectormachin committed Aug 29, 2023
1 parent 9acbe42 commit 2125148
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions task.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@ class CopyAssets(Task):

@classmethod
def validate(cls, payload: dict[str, Any]) -> bool:
payload["process"] = payload["process"][0]
if "assets" not in payload["process"]["tasks"][cls.name]:
raise InvalidInput("assets that need to be copied required to be specified")
return True

def process(
self, assets: List[str], drop_assets: List[str]
) -> List[Dict[str, Any]]:
print(self._payload)
# process method overrides Task
created_items = []

payload = self._payload
print(payload)

try:
item = self.items[0]
Expand Down Expand Up @@ -82,6 +85,7 @@ def process(
)

def handler(event: dict[str, Any], context: dict[str, Any] = {}) -> Task:
print(event)
return CopyAssets.handler(event)


Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "v0.0.5"
"version": "v0.0.6"
}

0 comments on commit 2125148

Please sign in to comment.