Skip to content
New issue

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

chain decorators #231

Open
catchthemonster opened this issue Mar 26, 2024 · 0 comments
Open

chain decorators #231

catchthemonster opened this issue Mar 26, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@catchthemonster
Copy link

Hi, very interesting and powerful scheduler with excellent features. I am trying to integrate this scheduler into huge Python framework.
Framework is coded from scratch and most if not all functionality is decoupled (multiprocessing) with async/sync behaviour being implemented all over framework.
I am planning to use rocketry as a runtime scheduling system.
my question is on decorators with the string syntax! If I understand authors, with string syntax i would create a place holder methods (task schedules) in my module (integrated in fastApi mp app) that is running under this framework. Is there any example of passing string to decorator in real time from templates. Do i need to chain, wrap decorator for task with another decorator to use *args and **kwargs or is there another option. i do see that cron syntax can be used too.
In essence I am trying to use more generic methods for execution of schedules:
I am planing to have queues of tasks that are loaded on bootstrap of framework and fastApi scheduler running through these meta methods of execution:
setupDefaultScheduler(some week day some exact time)
overwriteDefaultScheduler( some week day some exact time) _. delete existing default and create a new task - using sessions
runAdHock ( if I tell you run now run it but keep the latest scheduler default or overwrite)
Rest of Rocketry I do understand and I will use logging, sessions, queuing, conditions and so forth.
Most important for me is to run these tasks as async processes (with some conditions) in async fastApi app as generic app running in separate process (mp) in bigger framework driven with all static and predefined data and conditions as key value pairs.
So again, should i wrap or chain task decorator into another decorator to have syntax freedom and run time ability to change...
Regards,

@catchthemonster catchthemonster added the documentation Improvements or additions to documentation label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant