Commit graph

25 commits

Author SHA1 Message Date
dettlaff f781b51a6f Merge branch 'master' into def/nix-collect-garbage-endpoint 2023-04-05 13:52:48 +03:00
dettlaff a67f3e822a fix: do a redis reset() 2023-04-05 13:49:56 +03:00
dettlaff cf06d4c8d5 refactor: delete purest of nix_collect_garbage() 2023-04-03 17:41:41 +03:00
ВашÐdettlaff 88d66fea8c fix: percentage 2023-03-23 20:49:30 +03:00
Inex Code cb403a94bd fix: typing 2022-12-30 21:06:16 +03:00
def fcdd61006b fix: types, add tests 2022-12-27 04:15:02 +04:00
def 2340a0f8e9 test: fix nix collect garbage, add tests 2022-12-19 06:27:44 +04:00
def 510b94039e refactor: nix-collect-garbage is now pure 2022-12-13 05:44:52 +04:00
def 3ecd522bd2 refactor: delete unnecessary import 2022-12-03 22:30:41 +04:00
def 4ce96c303d feat: loading percentage 2022-12-03 22:27:10 +04: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
def 6b93df9630 fix: subprocess.check_output 2022-11-24 06:32:37 +04:00
def 13d3261d36 feat: add nix-collect-garbage job 2022-11-24 06:08:58 +04: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