dettlaff
28701e1608
fix: do a redis reset()
2023-06-16 08:08:36 +04:00
dettlaff
96c013c4e7
refactor: delete purest of nix_collect_garbage()
2023-06-16 08:08:36 +04:00
ВашÐdettlaff
03b5a6b5e4
fix: percentage
2023-06-16 08:08:36 +04:00
def
af0129bdfe
fix: types, add tests
2023-06-16 04:06:49 +00:00
def
7553202a69
test: fix nix collect garbage, add tests
2023-06-16 04:06:49 +00:00
def
7e3adffb68
refactor: nix-collect-garbage is now pure
2023-06-16 04:06:49 +00:00
def
f42594f1fb
refactor: delete unnecessary import
2023-06-16 04:06:49 +00:00
def
6ef9222e32
feat: loading percentage
2023-06-16 04:06:49 +00:00
def
ba168fc92b
fix: subprocess.check_output
2023-06-16 04:06:49 +00:00
def
57ec87bf43
feat: add nix-collect-garbage job
2023-06-16 04:06:49 +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