Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simone Rossi
main
Commits
4cab582e
Commit
4cab582e
authored
Nov 29, 2017
by
Daniele Venzano
Browse files
Fix pylint warnings
parent
25304fa4
Changes
1
Hide whitespace changes
Inline
Side-by-side
zoe_master/backends/interface.py
View file @
4cab582e
...
...
@@ -20,12 +20,12 @@ import time
from
typing
import
List
from
zoe_lib.config
import
get_conf
from
zoe_lib.state
import
Execution
,
Service
,
SQLManager
# pylint: disable=unused-import
from
zoe_lib.state
import
Execution
,
Service
# pylint: disable=unused-import
from
zoe_master.backends.base
import
BaseBackend
from
zoe_master.backends.service_instance
import
ServiceInstance
from
zoe_master.exceptions
import
ZoeStartExecutionFatalException
,
ZoeStartExecutionRetryException
,
ZoeException
from
zoe_master.stats
import
ClusterStats
,
NodeStats
# pylint: disable=unused-import
from
zoe_master.stats
import
ClusterStats
# pylint: disable=unused-import
try
:
from
zoe_master.backends.swarm.backend
import
SwarmBackend
...
...
@@ -158,7 +158,8 @@ def terminate_service(service: Service) -> None:
backend
=
_get_backend
()
if
service
.
status
!=
Service
.
INACTIVE_STATUS
:
if
service
.
status
==
Service
.
ERROR_STATUS
:
return
backend
.
terminate_service
(
service
)
log
.
debug
(
'Service {} terminated'
.
format
(
service
.
name
))
elif
service
.
status
==
Service
.
ACTIVE_STATUS
or
service
.
status
==
Service
.
TERMINATING_STATUS
or
service
.
status
==
Service
.
STARTING_STATUS
:
service
.
set_terminating
()
backend
.
terminate_service
(
service
)
...
...
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