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
74b3cb62
Commit
74b3cb62
authored
Oct 09, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add debug logs to trace debug value inheritance from main process to workers
parent
3e6f1613
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
config.py
vidai/config.py
+12
-6
worker_analysis.py
vidai/worker_analysis.py
+1
-0
No files found.
vidai/config.py
View file @
74b3cb62
...
@@ -33,27 +33,33 @@ def initialize_config(cli_args=None) -> None:
...
@@ -33,27 +33,33 @@ def initialize_config(cli_args=None) -> None:
initial_config
=
load_initial_config
(
cli_args
)
initial_config
=
load_initial_config
(
cli_args
)
# Special handling for debug: reset to false unless explicitly set via CLI or env var
# Special handling for debug: reset to false unless explicitly set via CLI, env var, or config file
# (config files are ignored for debug to prevent persistent debug settings)
debug_explicitly_set
=
False
debug_explicitly_set
=
False
if
cli_args
and
hasattr
(
cli_args
,
'debug'
)
and
cli_args
.
debug
:
if
cli_args
and
hasattr
(
cli_args
,
'debug'
)
and
cli_args
.
debug
:
debug_explicitly_set
=
True
debug_explicitly_set
=
True
if
f
'VIDAI_DEBUG'
in
os
.
environ
:
elif
f
'VIDAI_DEBUG'
in
os
.
environ
:
debug_explicitly_set
=
True
elif
'debug'
in
initial_config
and
initial_config
[
'debug'
]
!=
DEFAULTS
[
'debug'
]:
debug_explicitly_set
=
True
debug_explicitly_set
=
True
if
not
debug_explicitly_set
:
if
not
debug_explicitly_set
:
# Reset debug to false if not explicitly set via CLI
or env
# Reset debug to false if not explicitly set via CLI
, env, or config file
initial_config
[
'debug'
]
=
'false'
initial_config
[
'debug'
]
=
'false'
print
(
f
"MAIN_DEBUG_SET: debug reset to false (not explicitly set)"
)
else
:
print
(
f
"MAIN_DEBUG_SET: debug kept as {initial_config['debug']} (explicitly set)"
)
# Special handling for debug_web: same logic as debug
# Special handling for debug_web: same logic as debug
debug_web_explicitly_set
=
False
debug_web_explicitly_set
=
False
if
cli_args
and
hasattr
(
cli_args
,
'debug_web'
)
and
cli_args
.
debug_web
:
if
cli_args
and
hasattr
(
cli_args
,
'debug_web'
)
and
cli_args
.
debug_web
:
debug_web_explicitly_set
=
True
debug_web_explicitly_set
=
True
if
f
'VIDAI_DEBUG_WEB'
in
os
.
environ
:
elif
f
'VIDAI_DEBUG_WEB'
in
os
.
environ
:
debug_web_explicitly_set
=
True
elif
'debug_web'
in
initial_config
and
initial_config
[
'debug_web'
]
!=
DEFAULTS
[
'debug_web'
]:
debug_web_explicitly_set
=
True
debug_web_explicitly_set
=
True
if
not
debug_web_explicitly_set
:
if
not
debug_web_explicitly_set
:
# Reset debug_web to false if not explicitly set via CLI
or env
# Reset debug_web to false if not explicitly set via CLI
, env, or config file
initial_config
[
'debug_web'
]
=
'false'
initial_config
[
'debug_web'
]
=
'false'
# Store all environment variables that start with VIDAI_
# Store all environment variables that start with VIDAI_
...
...
vidai/worker_analysis.py
View file @
74b3cb62
...
@@ -451,6 +451,7 @@ def analyze_media(media_path, prompt, model_path, interval=10, job_id_int=None,
...
@@ -451,6 +451,7 @@ def analyze_media(media_path, prompt, model_path, interval=10, job_id_int=None,
return
result
,
total_tokens
return
result
,
total_tokens
def
worker_process
(
backend_type
:
str
):
def
worker_process
(
backend_type
:
str
):
"""Main worker process."""
"""Main worker process."""
print
(
f
"WORKER_DEBUG_READ: get_debug() = {get_debug()}"
)
if
get_debug
():
if
get_debug
():
print
(
f
"DEBUG: Starting Analysis Worker for {backend_type}..."
)
print
(
f
"DEBUG: Starting Analysis Worker for {backend_type}..."
)
print
(
f
"DEBUG: Worker PID: {os.getpid()}"
)
print
(
f
"DEBUG: Worker PID: {os.getpid()}"
)
...
...
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