Inex Code
9cf4d46c50
redis/jobs-coverage ( #24 )
2022-12-02 13:01:09 +02:00
Houkime
d47368cbe9
Jobs: test get_job() return values
...
Coverage is now at 99%
2022-11-30 17:26:38 +00: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
Inex Code
f0132266e9
Merge pull request 'bind nix-shell's redis to localhost' ( #23 ) from redis/nixshell-redis-bindlocal into redis/connection-pool
...
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api/pulls/23
2022-11-30 17:52:29 +02:00
Houkime
870d2c408d
jobs: test nofail at nonexistent update
2022-11-30 15:37:59 +00:00
Houkime
f51e378ff0
jobs: test updating more fields
2022-11-30 15:21:57 +00:00
Houkime
7acbba9960
jobs: minimal update test
2022-11-30 15:12:42 +00:00
Houkime
106a083ca2
jobs: simplify reset
...
Also ups test coverage
2022-11-30 14:47:56 +00:00
Houkime
b6eeec23cc
jobs: singlejob fixture
2022-11-30 14:31:37 +00:00
Houkime
c21b6cb071
jobs: dedicated reset test
2022-11-30 14:17:53 +00:00
Houkime
144f95fb34
bind nix-shell's redis to localhost
...
For security, mainly. Also, limit to one process.
A follow up to #22
2022-11-30 11:20:08 +00:00
Inex Code
60919b88b9
Merge pull request 'Autostart a redis instance in nix shell.' ( #22 ) from redis/nixshell-redis-autostart into redis/connection-pool
...
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api/pulls/22
2022-11-28 14:50:57 +02:00
Inex Code
57794c9535
style(graphql): Add missing comma
...
\
2022-11-28 15:49:48 +03:00
Houkime
2e9cdf15ab
Autostart a redis instance in nix shell.
...
As a part of test environment, an unprivileged redis server is started on localhost:6379.
Redis connection pool detects when it is run in a development nix shell
and uses this port instead of a production unix socket. This way, redis
tests pass even on computers without redis installed.
2022-11-28 14:38:21 +02:00
Inex Code
3ce71b0993
Merge pull request 'migrate Jobs to redis' ( #20 ) from redis/jobs into redis/connection-pool
...
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api/pulls/20
2022-11-28 14:37:45 +02: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
def
e130d37033
refactor(repository): Tokens repository JSON backend ( #18 )
...
Co-authored-by: def <dettlaff@riseup.net>
Co-authored-by: Inex Code <inex.code@selfprivacy.org>
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api/pulls/18
Co-authored-by: def <dettlaff@riseup.net>
Co-committed-by: def <dettlaff@riseup.net>
2022-11-16 19:12:38 +02:00
Houkime
f7b7e5a0be
migrate Jobs to redis
2022-11-16 13:54:54 +00:00
Inex Code
9ee0240bbd
Merge pull request 'houkime-providers-api' ( #19 ) from houkime/selfprivacy-rest-api:houkime-providers-api into redis/connection-pool
...
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api/pulls/19
2022-11-02 17:35:58 +02:00
Houkime
41e5f89b7b
migrate backblaze settings to new json format
...
And adjust methods and tests
2022-11-02 13:52:33 +00:00
Houkime
07af2e59be
tests: fix backblaze bucket
2022-11-02 13:52:33 +00:00
Houkime
a723311b36
reroute system provider query
2022-11-02 13:52:33 +00:00
Houkime
589093b853
delete old cloudflare field
2022-11-02 13:52:33 +00:00
Houkime
6c6f45781c
add new fields to the rest of the test jsons. Missed some
2022-11-02 13:52:33 +00:00
Houkime
2d7bc0f154
remove cloudflare tokens from the rest of the test jsons. nobody seems to care
2022-11-02 13:52:33 +00:00
Houkime
5efa85f877
add provider fields to the rest of test jsons
2022-11-02 13:52:33 +00:00
Houkime
f4a7986cfa
Remove old cloudflare apiKey field from system test jsons
...
Strangely, no test were broken. Probably more testing is needed for
token-dependent methods.
2022-11-02 13:52:33 +00:00
Houkime
2ec0548c09
add provider fields to the test jsons under system
2022-11-02 13:52:33 +00:00
Houkime
dd15e0ab65
reroute dns provider query
2022-11-02 13:52:33 +00:00
Houkime
9540e26ce1
add digitalocean and backblaze options
2022-11-02 13:52:33 +00:00
Houkime
7d58eb3d92
fix wrong cloudflare field key
2022-11-02 13:52:33 +00:00
Houkime
decb98afe2
add providers.py to the list of migrations
...
Makes providers.py actually run.
2022-11-02 13:52:33 +00:00
Houkime
b0c26b876a
add providers migration
2022-11-02 13:52:33 +00:00
inexcode
27255cb533
docs: add note about tracking time to CONTRIBUTING
...
spent @5m
2022-11-01 14:59:23 +03:00
inexcode
83736e1e8f
docs: add a pull request section to contributing.md
2022-11-01 11:38:37 +03:00
inexcode
19a4ec5377
feat: Add redis pool singleton
2022-10-28 11:24:45 +03:00
inexcode
8cdacb73dd
refactor: Use singleton metaclass for all singleton classes
2022-10-27 18:31:52 +03:00
Inex Code
0a09a338b8
Register migration
2022-09-22 19:41:48 +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
e387e30983
Fix handling of FileNotFoundError during size calculation
2022-09-22 18:34:33 +03:00
Inex Code
582e38452d
Fix Gitea moving
2022-09-19 03:50:43 +03:00
Inex Code
6bbceca917
Fix ownership issue
2022-09-19 03:04:57 +03:00
Inex Code
9a339729b7
Fix Generic service mover success output
2022-09-19 02:57:22 +03:00
Inex Code
a7208c1a91
Fix generic service mover being unable to move
2022-09-19 02:43:06 +03:00