Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
balancer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c18a7a0b
authored
May 18, 2023
by
Karsa Zoltán István
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
status setup
parent
69d6fc05
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
balancer/util.py
+1
-2
sredis/sredis.py
+3
-5
No files found.
balancer/util.py
View file @
c18a7a0b
...
@@ -42,4 +42,4 @@ def proxy_datacenters(
...
@@ -42,4 +42,4 @@ def proxy_datacenters(
else
:
else
:
obj
[
"datacenter"
]
=
server
obj
[
"datacenter"
]
=
server
response
=
ORJSONResponse
(
obj
,
status_code
=
t_resp
.
status_code
)
response
=
ORJSONResponse
(
obj
,
status_code
=
t_resp
.
status_code
)
return
response
return
response
\ No newline at end of file
sredis/sredis.py
View file @
c18a7a0b
...
@@ -8,14 +8,12 @@ from core.auth import hash_pass
...
@@ -8,14 +8,12 @@ from core.auth import hash_pass
from
fastapi
import
HTTPException
from
fastapi
import
HTTPException
import
random
import
random
def
get_status
(
datacenter_url
:
str
):
def
get_status
(
datacenter_url
:
str
):
resp
=
requests
.
request
(
resp
=
requests
.
request
(
method
=
"GET"
,
url
=
datacenter_url
,
verify
=
False
)
method
=
"GET"
,
url
=
datacenter_url
,
verify
=
False
)
return
int
(
resp
.
status_code
/
100
)
==
2
return
int
(
resp
.
status_code
/
100
)
==
2
r
=
redis
.
Redis
(
host
=
"localhost"
,
port
=
6379
,
db
=
0
,
decode_responses
=
True
)
r
=
redis
.
Redis
(
host
=
"localhost"
,
port
=
6379
,
db
=
0
,
decode_responses
=
True
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment