rocketry icon indicating copy to clipboard operation
rocketry copied to clipboard

ENH: Multiple values to at/on in cond API

Open Miksus opened this issue 2 years ago • 0 comments

This PR makes this possible:

from rocketry.conds import daily, weekly

@app.task(daily.at("12:00", "18:00"))
def do_daily_twice():
    ... # Condition translates to: daily.at("12:00") | daily.at("18:00")

@app.task(weekly.on("Mon", "Fri"))
def do_weekly_twice():
    ... # Condition translates to: weekly.on("Mon") | weekly.on("Fri")

Miksus avatar Sep 25 '22 15:09 Miksus