Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
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
edx
configuration
Commits
333f4b0d
Commit
333f4b0d
authored
Jul 07, 2016
by
Michael Roytman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up
parent
0057614b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
util/balancecontainers.py
+2
-3
No files found.
util/balancecontainers.py
View file @
333f4b0d
...
...
@@ -27,7 +27,7 @@ def pack_containers(containers, num_shards):
try
:
config
=
yaml
.
load
(
file
)
except
yaml
.
YAMLError
,
exc
:
LOGGER
.
warning
(
"error in configuration file:
%
s"
%
str
(
exc
))
LOGGER
.
error
(
"error in configuration file:
%
s"
%
str
(
exc
))
sys
.
exit
(
1
)
# get container weights
...
...
@@ -83,7 +83,6 @@ if __name__ == '__main__':
# get containers from standard in
for
line
in
sys
.
stdin
:
# strip whitespace and brackets
line
=
line
.
strip
()
line
=
line
.
strip
(
"[]"
)
...
...
@@ -93,7 +92,7 @@ if __name__ == '__main__':
# find optimal packing of the containers amongst shards
shards
=
pack_containers
(
containers
,
args
.
num_shards
)
# print space separate list of containers for each shard
# print space separate
d
list of containers for each shard
for
shard
in
shards
:
middle
=
" "
...
...
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