Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
V
vidai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SexHackMe
vidai
Commits
d3e3fb72
Commit
d3e3fb72
authored
Oct 09, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix job timeout in cluster master by extending timeout when progress is detected
parent
b305223e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
cluster_master.py
vidai/cluster_master.py
+17
-3
No files found.
vidai/cluster_master.py
View file @
d3e3fb72
...
...
@@ -719,8 +719,13 @@ class ClusterMaster:
from
.comm
import
SocketCommunicator
from
.config
import
get_backend_web_port
# Progress tracking for timeout extension
has_progress
=
False
last_progress_time
=
time
.
time
()
max_iterations
=
91
# Base timeout: 91 seconds
# Poll for result
for
_
in
range
(
91
):
# Poll for up to 91 seconds (91 * 1s)
for
_
in
range
(
max_iterations
):
try
:
backend_comm
=
SocketCommunicator
(
host
=
'localhost'
,
port
=
get_backend_web_port
(),
comm_type
=
'tcp'
)
backend_comm
.
connect
()
...
...
@@ -777,6 +782,15 @@ class ClusterMaster:
return
elif
response
and
response
.
msg_type
==
'result_pending'
:
# Check if we have recent progress to extend timeout
from
.web
import
get_progress
progress_response
=
get_progress
(
job_id
)
if
progress_response
and
'progress'
in
progress_response
:
has_progress
=
True
last_progress_time
=
time
.
time
()
# Extend timeout when progress is active
max_iterations
=
min
(
max_iterations
+
50
,
500
)
# Add up to 5 more seconds per progress check
# Result not ready yet, wait and try again
await
asyncio
.
sleep
(
1
)
continue
...
...
@@ -786,10 +800,10 @@ class ClusterMaster:
await
asyncio
.
sleep
(
1
)
# Timeout - job took too long
print
(
f
"Job {job_id} timed out waiting for result (
91
seconds)"
)
print
(
f
"Job {job_id} timed out waiting for result (
{max_iterations}
seconds)"
)
await
self
.
_handle_job_result
({
'job_id'
:
job_id
,
'result'
:
{
'status'
:
'failed'
,
'error'
:
'Job timed out after 91
seconds'
}
'result'
:
{
'status'
:
'failed'
,
'error'
:
f
'Job timed out after {max_iterations}
seconds'
}
})
except
Exception
as
e
:
...
...
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