Skip to content

Commit

Permalink
Fix recurrence (#71)
Browse files Browse the repository at this point in the history
Recurrence didn't properly work as we passed in the
empty list for the by-* fiedls by default
which means "No valid time-unit",
e.g bymonth=[] means no month at all. never.
  • Loading branch information
Marenz authored Oct 24, 2024
2 parents bee57c0 + bd751ca commit 2f9c764
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## Summary

* `frequenz-sdk` dependency has been extended to include version `1.0.0-rc1000`.
This is a hot fix for recurrence not working
11 changes: 6 additions & 5 deletions src/frequenz/dispatch/_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,14 @@ def _prepare_rrule(self) -> rrule.rrule:
dtstart=self.start_time,
count=count,
until=until,
byminute=self.recurrence.byminutes,
byhour=self.recurrence.byhours,
byminute=self.recurrence.byminutes or None,
byhour=self.recurrence.byhours or None,
byweekday=[
_RRULE_WEEKDAY_MAP[weekday] for weekday in self.recurrence.byweekdays
],
bymonthday=self.recurrence.bymonthdays,
bymonth=self.recurrence.bymonths,
]
or None,
bymonthday=self.recurrence.bymonthdays or None,
bymonth=self.recurrence.bymonths or None,
interval=self.recurrence.interval,
)

Expand Down

0 comments on commit 2f9c764

Please sign in to comment.