Miksus / rocketry

Modern scheduling library for Python
https://rocketry.readthedocs.io
MIT License
3.25k stars 105 forks source link

DOCS - Example for creating a task & modifying task-types #137

Open rohansh-tty opened 1 year ago

rohansh-tty commented 1 year ago

Is it corrected in the latest version (master branch)? no

Latest version of the docs: https://rocketry.readthedocs.io/en/latest/

Location in the documentation you wish to improve

Describe the problem

In the first page, there seems a function(task name) typo. To create a task:


from rocketry.conds import daily
from rocketry.args import Session

def do_things():
    ...

@app.task()
def remove_task(session=Session()):
    session.create_task(func=do_things, start_cond=daily)

For the second page, following from here, this line

app.task('daily', code='print("Hello world")')

Suggestion for the fix