Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Miksus
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
Show HN: Read your emails with Red Box (Python)
(github.com)
2 points
by
Miksus
4y ago
|
0 comments
2.
▲
by
Miksus
4y ago
Sorry, I'm in quite a hurry (so sorry for the language and lack of ellaboration). You can create tasks dynamically and you can create them after starting the scheduler. You can use app.session.create_task and pass "func" (Pyt
3.
▲
by
Miksus
4y ago
That's a great idea actually. Thanks, I think that should be pretty easy to do!
4.
▲
by
Miksus
4y ago
Do you mean with "dynamically schedule and unschedule" that you sort of manually (or using another task) stop running a task in its specified interval (or condition)? It does support this, there is an argument "disabled"
5.
▲
by
Miksus
4y ago
Thanks a lot, nice to hear! The system knows which task ran and when by extedning logging (from standard library). There is a logger called "rocketry.task" that should have a handler which can be read as well: redbird.logging.Repo
6.
▲
by
Miksus
4y ago
If you want an API (or UI), just clone this and modify it as you need: https://github.com/Miksus/rocketry-with-fastapi . I also wrote an article to Medium how it works with FastAPI: https://itnext.io/sch
7.
▲
by
Miksus
4y ago
You can do without a database backend but of course then the task logs are not kept in case of restart. Currently you can use any SQL database that SQLAlchemy supports, MongoDB or CSV files, or any other if you wish to extend Red Bird. It u
8.
▲
by
Miksus
4y ago
Putting it mildly, this is nothing more than a sophisticated Python while loop. And it's not as performance friendly as Cron due to that Rocketry runs on Python. You need to be able to leave Python program running in order to use Rocke
9.
▲
by
Miksus
4y ago
Yep, exactly. Rocketry works on conditions which are either true or false thus you need to give it a time range. Points in time do not actually make much sense in terms of scheduling as nothing can be run exactly at specified point. There s
10.
▲
by
Miksus
4y ago
Of course I have this running though it's still running older version (been too busy with developing this). It has been running over half a year for my scrapers without a single interruption even though the machine has the worst specs
11.
▲
by
Miksus
4y ago
Yep it does, the main process and thread is responsible of communicating with the logs (see the other comment in which I explained the logging mechanism). If you run a task in subprocess, the logs are relayed via queue to the main process a
12.
▲
by
Miksus
4y ago
There is a repository mechanism to store the logs. The task logger is simply an extension of logging library. Seems my docs are slightly off on setting up the CSV repo but you can just add a RepoHandler (from redbird) to the logger called r
13.
▲
by
Miksus
4y ago
I wrote my own ideas of how it compares to APScheduler (and other alternatives) here: https://rocketry.readthedocs.io/en/stable/rocketry_vs_altern... Note that this is my own opinions which probably are a bit bias
14.
▲
Show HN: Rocketry – Statement-based scheduling framework for Python
(github.com)
168 points
by
Miksus
4y ago
|
67 comments
15.
▲
Show HN: Red Mail – Advanced email sender for Python
(github.com)
9 points
by
Miksus
4y ago
|
0 comments