rocketry icon indicating copy to clipboard operation
rocketry copied to clipboard

add: Custom arguments with custom cond

Open Miksus opened this issue 2 years ago • 0 comments

Now one can pass arguments when using a custom condition.

Now this should work:

from pathlib import Path

@app.cond()
def file_exists(file):
    return Path(file).exists()

@app.task(file_exists("myfile.csv"))
def do_things():
    ...

Miksus avatar Aug 06 '22 07:08 Miksus