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
5f82047c
Commit
5f82047c
authored
Oct 08, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add logging for job assignment in cluster master
parent
df7dfa12
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
cluster_master.py
vidai/cluster_master.py
+8
-0
No files found.
vidai/cluster_master.py
View file @
5f82047c
...
...
@@ -1004,10 +1004,14 @@ class ClusterMaster:
jobs
=
cursor
.
fetchall
()
conn
.
close
()
if
jobs
:
print
(
f
"Found {len(jobs)} processing job(s) without assigned job_id"
)
for
job_row
in
jobs
:
job
=
dict
(
job_row
)
job
[
'data'
]
=
json
.
loads
(
job
[
'data'
])
if
job
[
'data'
]
else
None
process_type
=
'analysis'
if
job
[
'request_type'
]
==
'analyze'
else
(
'training'
if
job
[
'request_type'
]
==
'train'
else
job
[
'request_type'
])
print
(
f
"Attempting to assign job {job['id']} for {process_type}"
)
worker_key
=
self
.
select_worker_for_job
(
process_type
,
job
[
'data'
]
.
get
(
'model_path'
,
'Qwen/Qwen2.5-VL-7B-Instruct'
),
job
[
'data'
])
if
worker_key
:
job_id
=
self
.
assign_job_to_worker
(
worker_key
,
job
[
'data'
])
...
...
@@ -1015,6 +1019,10 @@ class ClusterMaster:
from
.database
import
update_queue_status
update_queue_status
(
job
[
'id'
],
'processing'
,
{
'job_id'
:
job_id
,
'status'
:
'Assigned to worker'
},
job_id
=
job_id
)
print
(
f
"Assigned job {job['id']} to worker {worker_key} with job_id {job_id}"
)
else
:
print
(
f
"Failed to assign job {job['id']} to worker {worker_key}"
)
else
:
print
(
f
"No suitable worker found for job {job['id']}"
)
await
asyncio
.
sleep
(
5
)
# Poll every 5 seconds
...
...
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