We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug I'm trying to run the example described here.
It seems that the do_things function is not executed, when running the example
do_things
The expected behaviour is
To Reproduce I modified the example a bit, so that files are touched and hence I can verify that the function do_things is run correctly.
main.py:
from rocketry import Rocketry from pathlib import Path app = Rocketry() @app.task() def do_things(): Path("getting_here").touch() if __name__ == "__main__": Path("getting_here_too").touch() app.session.run(do_things)
pyproject.toml:
[tool.poetry] name = "rocketry_playground" version = "0.1.0" description = "" readme = "README.md" [tool.poetry.dependencies] python = "^3.11" rocketry = "^2.5.1" pydantic = "^1.10" sqlalchemy = "1.4.41" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api"
Run:
poetry install poetry run python main.py
Expected behavior I expect there to be two files added after the script runs:
getting_here_too
getting_here
Actual behavior
(note that the getting_here file is not generated.
The text was updated successfully, but these errors were encountered:
Just fixed it by checking out the run method from app.session. It should be:
run
app.session
from rocketry import Rocketry app = Rocketry() @app.task() def do_things(): print("Getting here") if __name__ == "__main__": app.session.run("do_things",)
Could you confirm that this is indeed the correct way to call it? If so, I can make a PR to update the docs.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
I'm trying to run the example described here.
It seems that the
do_things
function is not executed, when running the exampleThe expected behaviour is
To Reproduce
I modified the example a bit, so that files are touched and hence I can verify that the function
do_things
is run correctly.main.py:
pyproject.toml:
Run:
Expected behavior
I expect there to be two files added after the script runs:
getting_here_too
generated in the main loopgetting_here
generated in the do_things functionActual behavior
(note that the
getting_here
file is not generated.The text was updated successfully, but these errors were encountered: