Commit graph

27 commits

Author SHA1 Message Date
Inex Code b98c020f23 fix: wrong systemd unit used 2024-02-12 18:41:24 +03:00
Inex Code 94456af7d4 fix: debugging 2024-02-12 18:34:55 +03:00
Inex Code 2019da1e10 feat: Track the status of the nixos rebuild systemd unit 2024-02-12 18:17:18 +03:00
Houkime b545a400c3 doc(jobs): document that we are tz-naive when storing jobs 2023-11-10 11:47:48 +00:00
Houkime 0912ac1831 feature(jobs): set ttl via method 2023-10-10 20:25:14 +03:00
Houkime d664fcbdc4 refactor(jobs):track 100-on-finished as a progress update 2023-07-21 13:06:18 +00:00
Inex Code 0245d629fd refactor(backups): linting 2023-07-20 18:24:26 +03:00
Houkime cd2e9d3ba3 fix(jobs): make finishing the job set progress to 100 2023-06-28 13:22:53 +00:00
Houkime 03d4632465 refactor(backups): remove extraneous asserts from jobs 2023-05-17 20:27:42 +00:00
Houkime 60806cd536 feature(backups): job progress logs 2023-05-17 20:27:42 +00:00
Houkime ddd2176a5d refactor(backups): break out job logs status prefix 2023-05-17 20:27:42 +00:00
Houkime e25aa2cb33 test(backups): test that the job has run 2023-05-17 20:27:42 +00:00
Houkime 7ddfad10d4 refactor(backups): quick-expiration logs of jobs status updates 2023-05-17 20:27:42 +00:00
Inex Code cb403a94bd fix: typing 2022-12-30 21:06:16 +03:00
Houkime 063dfafc19 Jobs: fix return value of remove_by_uid
And add a test for said return value.
2022-11-30 17:06:43 +00:00
Houkime 5c86706f4b Jobs: fix value access in is_busy()
Also added a test for is_busy() that highlighted this bug.
2022-11-30 16:41:20 +00:00
Houkime 14c4ae26ab explicitly mark helper functions private
I thought about making them private class members, but that would get
unreadable and do more harm than good.
2022-11-30 16:22:46 +00:00
Houkime 106a083ca2 jobs: simplify reset
Also ups test coverage
2022-11-30 14:47:56 +00:00
Houkime d6ef01c0c7 Add TTL to storage of finished or failed jobs
Defaulting to 10 days.
2022-11-23 16:29:50 +00:00
Houkime 244851c7cc jobs: remove 'jobs' list, and use 'jobs:' prefix
Less complexity, easier to add redis-native TTL
2022-11-23 15:04:39 +00:00
Houkime 5afa2338ca Migrate Jobs to redis
Jobs API shall now use redis to store and retrieve jobs. This will make
it possible to add pubsub for jobs updates. For now it uses blocking api
of redis.
2022-11-23 14:43:06 +00:00
Houkime f7b7e5a0be migrate Jobs to redis 2022-11-16 13:54:54 +00:00
inexcode 8cdacb73dd refactor: Use singleton metaclass for all singleton classes 2022-10-27 18:31:52 +03:00
Inex Code 7a1e8af8fe Catch error during binds migration and delete the job if it is stuck during restart 2022-09-22 19:38:59 +03:00
Inex Code d7cba49c4a Fix job uid generation 2022-09-09 17:42:40 +03:00
Inex Code 7935de0fe1 Migrate to FastAPI (#13)
Co-authored-by: inexcode <inex.code@selfprivacy.org>
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api/pulls/13
2022-08-25 20:03:56 +03:00
Inex Code bec99f29ec Add a jobs singleton 2022-07-30 18:24:21 +03:00