Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
shadowban-revive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
shadowban-revive
Commits
89a11660
Commit
89a11660
authored
May 28, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
e88eba2e
Pipeline
#36925
passed with stages
in 1 minute and 27 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
main.py
main.py
+4
-4
No files found.
main.py
View file @
89a11660
...
...
@@ -64,8 +64,8 @@ FeaturesDict = {
FeaturesJson
=
json
.
dumps
(
FeaturesDict
)
# Thread‑safe health flag
_health_lock
=
threading
.
Lock
()
_is_healthy
:
bool
=
True
#
_health_lock = threading.Lock()
#
_is_healthy: bool = True
# ---------------------------------------------------------------------------
# Redis (same sync client—the API is blocking so FastAPI’s default thread‑pool
...
...
@@ -263,7 +263,7 @@ async def doSearch(screen_name: str, client: httpx.AsyncClient) -> Optional[List
print
(
"Search Error parsing JSON:"
,
r
.
text
)
return
None
global
_is_healthy
#
global _is_healthy
_is_healthy
=
"data"
in
data
if
not
_is_healthy
:
print
(
"Search error:"
,
r
.
text
)
...
...
@@ -611,7 +611,7 @@ class HealthyResponse(BaseModel):
healthy
:
bool
@
app
.
get
(
"/_healthy"
,
response_model
=
HealthyResponse
)
async
def
healthy
():
def
healthy
():
# The old behaviour always answered 200 unless the global flag failed.
# Keeping that.
return
HealthyResponse
(
healthy
=
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