Skip to content

Commit

Permalink
Merge branch 'main' into doc/update-docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-voltarelli authored May 9, 2024
2 parents f2cd9fe + a146544 commit 6b0a7bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion botcity/maestro/datapool/datapool.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class DataPool:
datapool_id: str = None
maestro: 'BotMaestroSDK' = None # noqa: F821
active: bool = True
repository_label: str = "DEFAULT"

def to_dict(self):
"""
Expand All @@ -43,6 +44,7 @@ def to_dict(self):
"maxErrorsBeforeInactive": self.max_errors_before_inactive,
"itemMaxProcessingTime": self.item_max_processing_time,
"active": self.active,
"repositoryLabel": self.repository_label
}

@staticmethod
Expand All @@ -66,7 +68,8 @@ def from_json(payload: bytes, maestro: 'BotMaestroSDK') -> 'DataPool': # noqa:
max_auto_retry=values.get('maxAutoRetry'),
item_max_processing_time=values.get("itemMaxProcessingTime"),
max_errors_before_inactive=values.get("maxErrorsBeforeInactive"),
abort_on_error=values.get("abortOnError"), maestro=maestro,
abort_on_error=values.get("abortOnError"),
repository_label=values.get("repositoryLabel"), maestro=maestro,
)
return datapool

Expand All @@ -93,6 +96,7 @@ def _update_from_json(self, payload: str):
self.max_errors_before_inactive = values.get("maxErrorsBeforeInactive")
self.abort_on_error = values.get("abortOnError")
self.active = values.get("active")
self.repository_label = values.get("repositoryLabel")

def activate(self):
"""
Expand Down

0 comments on commit 6b0a7bb

Please sign in to comment.