Skip to content

Commit fa8ad3d

Browse files
Fixed jobs config section validation (#277)
1 parent 337886a commit fa8ad3d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Fixed
66

7+
* config: Fixed `jobs` config section validation.
78
* tzkt: Fixed `get_originated_contracts` and `get_similar_contracts` methods response.
89

910
## 5.0.0-rc3 - 2022-03-28

src/dipdup/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ class JobConfig(NameMixin):
985985
args: Dict[str, Any] = field(default_factory=dict)
986986

987987
def __post_init_post_parse__(self):
988-
schedules_enabled = map(lambda x: int(bool(x)), (self.crontab, self.interval, self.daemon))
988+
schedules_enabled = sum(map(lambda x: int(bool(x)), (self.crontab, self.interval, self.daemon)))
989989
if schedules_enabled > 1:
990990
raise ConfigurationError('Only one of `crontab`, `interval` of `daemon` can be specified')
991991
elif not schedules_enabled:

0 commit comments

Comments
 (0)