Commit graph

19 commits

Author SHA1 Message Date
Houkime
c5c41b3ced refactor(backups): remove extraneous asserts from jobs 2023-07-17 16:05:00 +03:00
Houkime
135fb0c42d feature(backups): job progress logs 2023-07-17 16:05:00 +03:00
Houkime
ca036b294a refactor(backups): break out job logs status prefix 2023-07-17 16:05:00 +03:00
Houkime
ebff2b308a test(backups): test that the job has run 2023-07-17 16:05:00 +03:00
Houkime
2a87eb80f9 refactor(backups): quick-expiration logs of jobs status updates 2023-07-17 16:05:00 +03: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