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
OpenEdx
configuration
Commits
e4197b2c
Commit
e4197b2c
authored
8 years ago
by
Ned Batchelder
Committed by
GitHub
8 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3675 from edx/nedbat/silent-needless-errors
Silently fail on missing requirements
parents
52a47266
6e4a47de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
util/balancecontainers.py
+15
-6
No files found.
util/balancecontainers.py
View file @
e4197b2c
import
yaml
import
os
import
pathlib2
import
itertools
import
sys
import
argparse
import
logging
import
os
import
sys
try
:
# This script is used by docker.mk at parse-time, which means when you run
# "make requirements" to install the required Python packages, this script
# runs before its requirements are installed. That means this import will
# fail. To prevent a successful installation from having irrelevant error
# messages, we catch the failure and exit silently.
import
pathlib2
except
ImportError
:
sys
.
exit
(
1
)
import
docker_images
TRAVIS_BUILD_DIR
=
os
.
environ
.
get
(
"TRAVIS_BUILD_DIR"
,
""
)
CONFIG_FILE_PATH
=
pathlib2
.
Path
(
TRAVIS_BUILD_DIR
,
"util"
,
"parsefiles_config.yml"
)
LOGGER
=
logging
.
getLogger
(
__name__
)
...
...
@@ -22,7 +31,7 @@ def pack_shards(used_images, num_shards):
"""
# sorts used containers in descending order on the weight
sorted_images
=
sorted
(
used_images
,
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
sorted_images
=
sorted
(
used_images
,
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
shards
=
[]
...
...
This diff is collapsed.
Click to expand it.
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