Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
f07b6e8c
Commit
f07b6e8c
authored
13 years ago
by
Martin Poirier
Browse files
Options
Downloads
Patches
Plain Diff
netrender
fix error when sending thumbnail to master
parent
28e9dc5b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
netrender/master.py
+1
-1
1 addition, 1 deletion
netrender/master.py
netrender/slave.py
+5
-8
5 additions, 8 deletions
netrender/slave.py
with
6 additions
and
9 deletions
netrender/master.py
+
1
−
1
View file @
f07b6e8c
...
...
@@ -814,7 +814,7 @@ class RenderHandler(http.server.BaseHTTPRequestHandler):
self
.
send_head
(
content
=
None
)
if
job
.
hasRenderResult
():
os
.
path
.
join
(
os
.
path
.
join
(
job
.
save_path
,
"
%06d.jpg
"
%
job_frame
))
self
.
write_file
(
os
.
path
.
join
(
os
.
path
.
join
(
job
.
save_path
,
"
%06d.jpg
"
%
job_frame
))
)
else
:
# frame not found
self
.
send_head
(
http
.
client
.
NO_CONTENT
)
...
...
This diff is collapsed.
Click to expand it.
netrender/slave.py
+
5
−
8
View file @
f07b6e8c
...
...
@@ -76,7 +76,7 @@ def testCancel(conn, job_id, frame_number):
else
:
return
False
def
testFile
(
conn
,
job_id
,
slave_id
,
rfile
,
JOB_PREFIX
,
main_path
=
None
):
def
testFile
(
conn
,
job_id
,
slave_id
,
rfile
,
JOB_PREFIX
,
main_path
=
None
):
job_full_path
=
prefixPath
(
JOB_PREFIX
,
rfile
.
filepath
,
main_path
)
found
=
os
.
path
.
exists
(
job_full_path
)
...
...
@@ -88,11 +88,11 @@ def testFile(conn, job_id, slave_id, rfile, JOB_PREFIX, main_path = None):
if
not
found
:
print
(
"
Found file %s at %s but signature mismatch!
"
%
(
rfile
.
filepath
,
job_full_path
))
os
.
remove
(
job_full_path
)
job_full_path
=
prefixPath
(
JOB_PREFIX
,
rfile
.
filepath
,
main_path
,
force
=
True
)
job_full_path
=
prefixPath
(
JOB_PREFIX
,
rfile
.
filepath
,
main_path
,
force
=
True
)
if
not
found
:
# Force prefix path if not found
job_full_path
=
prefixPath
(
JOB_PREFIX
,
rfile
.
filepath
,
main_path
,
force
=
True
)
job_full_path
=
prefixPath
(
JOB_PREFIX
,
rfile
.
filepath
,
main_path
,
force
=
True
)
temp_path
=
os
.
path
.
join
(
JOB_PREFIX
,
"
slave.temp
"
)
with
ConnectionContext
():
conn
.
request
(
"
GET
"
,
fileURL
(
job_id
,
rfile
.
index
),
headers
=
{
"
slave-id
"
:
slave_id
})
...
...
@@ -123,8 +123,6 @@ def breakable_timeout(timeout):
break
def
render_slave
(
engine
,
netsettings
,
threads
):
# timeout = 1 # UNUSED
bisleep
=
BreakableIncrementedSleep
(
INCREMENT_TIMEOUT
,
1
,
MAX_TIMEOUT
,
engine
.
test_break
)
engine
.
update_stats
(
""
,
"
Network render node initiation
"
)
...
...
@@ -142,7 +140,6 @@ def render_slave(engine, netsettings, threads):
conn
=
clientConnection
(
netsettings
.
server_address
,
netsettings
.
server_port
)
if
not
conn
:
# timeout = 1 # UNUSED
print
(
"
Connection failed, will try connecting again at most %i times
"
%
MAX_CONNECT_TRY
)
bisleep
.
reset
()
...
...
@@ -204,7 +201,7 @@ def render_slave(engine, netsettings, threads):
netrender
.
repath
.
update
(
job
)
engine
.
update_stats
(
""
,
"
Render File
"
+
main_file
+
"
for job
"
+
job
.
id
)
engine
.
update_stats
(
""
,
"
Render File
"
+
main_file
+
"
for job
"
+
job
.
id
)
elif
job
.
type
==
netrender
.
model
.
JOB_VCS
:
if
not
job
.
version_info
:
# Need to return an error to server, incorrect job type
...
...
@@ -218,7 +215,7 @@ def render_slave(engine, netsettings, threads):
# For VCS jobs, file path is relative to the working copy path
job_full_path
=
os
.
path
.
join
(
job
.
version_info
.
wpath
,
job_path
)
engine
.
update_stats
(
""
,
"
Render File
"
+
main_file
+
"
for job
"
+
job
.
id
)
engine
.
update_stats
(
""
,
"
Render File
"
+
main_file
+
"
for job
"
+
job
.
id
)
# announce log to master
logfile
=
netrender
.
model
.
LogFile
(
job
.
id
,
slave_id
,
[
frame
.
number
for
frame
in
job
.
frames
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment