Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Omit printing erroneous subtask count warning #4950

Merged
merged 2 commits into from
Nov 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions apps/rendering/task/framerenderingtask.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,14 @@ def _calculate_subtasks_count(
# whole number of subtasks.
new_subtasks_count = _round_int(subtasks_count, num_frames)

if new_subtasks_count > max_subtasks_count:
return max_subtasks_count
new_subtasks_count = min(new_subtasks_count, max_subtasks_count)
if new_subtasks_count != subtasks_count:
logger.warning(
"Cannot set total subtask count to %s. Changing to %s.",
subtasks_count,
new_subtasks_count
)

logger.warning("Cannot set total subtasks to %s. Changing to %s",
subtasks_count, new_subtasks_count)
return new_subtasks_count


Expand Down