Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor 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
mediaserver
envsetup
Commits
b83fabd9
Commit
b83fabd9
authored
8 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
PEP8 again...
parent
b4544d92
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_mediaworker.py
+4
-3
4 additions, 3 deletions
tests/test_mediaworker.py
with
4 additions
and
3 deletions
tests/test_mediaworker.py
+
4
−
3
View file @
b83fabd9
...
...
@@ -74,6 +74,7 @@ def check_celerity_connectivity(ip):
print
(
'
%sFailed to reach tasks server from MediaWorker
"
%s
"
.%s
'
%
(
RED
,
ip
,
DEF
))
return
False
def
check_mediaworker_in_whitelist
(
ip
):
nginx_vhosts_path
=
'
/etc/nginx/sites-enabled
'
vhosts
=
os
.
listdir
(
nginx_vhosts_path
)
...
...
@@ -83,7 +84,7 @@ def check_mediaworker_in_whitelist(ip):
with
open
(
vhost_path
,
'
r
'
)
as
f
:
d
=
f
.
read
()
if
'
msuser_whitelist
'
in
d
:
if
not
ip
in
d
:
if
ip
not
in
d
:
print
(
'
%sMediaWorker ip %s is not in %s whitelist%s
'
%
(
RED
,
ip
,
v
,
DEF
))
return
False
return
True
...
...
@@ -101,8 +102,8 @@ for worker_ip in worker_ips.split(','):
else
:
if
not
check_celerity_connectivity
(
worker_ip
):
all_ok
=
False
#if not run_tests(worker_ip):
# all_ok = False
#
if not run_tests(worker_ip):
#
all_ok = False
if
not
check_mediaworker_in_whitelist
(
worker_ip
):
all_ok
=
False
if
not
tested
:
...
...
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