PEP-8 fixes
This commit is contained in:
parent
85eb481e69
commit
579bb60819
@ -102,4 +102,3 @@ class ConductorWorkflowService(service.Service):
|
|||||||
task_received, msg.body, msg.id)
|
task_received, msg.body, msg.id)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
log.exception(ex)
|
log.exception(ex)
|
||||||
|
|
||||||
|
@ -162,7 +162,9 @@ class HeatExecutor(CommandBase):
|
|||||||
try:
|
try:
|
||||||
stack_info = self._heat_client.stacks.get(stack_id=self._stack)
|
stack_info = self._heat_client.stacks.get(stack_id=self._stack)
|
||||||
template = self._heat_client.stacks.template(
|
template = self._heat_client.stacks.template(
|
||||||
stack_id='{0}/{1}'.format(stack_info.stack_name, stack_info.id))
|
stack_id='{0}/{1}'.format(
|
||||||
|
stack_info.stack_name,
|
||||||
|
stack_info.id))
|
||||||
return template, stack_info.parameters
|
return template, stack_info.parameters
|
||||||
except heatclient.exc.HTTPNotFound:
|
except heatclient.exc.HTTPNotFound:
|
||||||
return {}, {}
|
return {}, {}
|
||||||
|
@ -57,5 +57,3 @@ class WindowsAgentExecutor(CommandBase):
|
|||||||
item['callback'](msg.body)
|
item['callback'](msg.body)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,7 +56,9 @@ class RmqClient(object):
|
|||||||
self._client.wait(promise)
|
self._client.wait(promise)
|
||||||
|
|
||||||
if exchange:
|
if exchange:
|
||||||
promise = self._client.exchange_declare(str(exchange), durable=True)
|
promise = self._client.exchange_declare(
|
||||||
|
str(exchange),
|
||||||
|
durable=True)
|
||||||
self._client.wait(promise)
|
self._client.wait(promise)
|
||||||
promise = self._client.queue_bind(
|
promise = self._client.queue_bind(
|
||||||
str(queue), str(exchange), routing_key=str(queue))
|
str(queue), str(exchange), routing_key=str(queue))
|
||||||
@ -66,7 +68,7 @@ class RmqClient(object):
|
|||||||
if not self._connected:
|
if not self._connected:
|
||||||
raise RuntimeError('Not connected to RabbitMQ')
|
raise RuntimeError('Not connected to RabbitMQ')
|
||||||
|
|
||||||
headers = { 'message_id': message.id }
|
headers = {'message_id': message.id}
|
||||||
|
|
||||||
promise = self._client.basic_publish(
|
promise = self._client.basic_publish(
|
||||||
exchange=str(exchange),
|
exchange=str(exchange),
|
||||||
@ -138,4 +140,3 @@ class Message(object):
|
|||||||
@id.setter
|
@id.setter
|
||||||
def id(self, value):
|
def id(self, value):
|
||||||
self._id = value or ''
|
self._id = value or ''
|
||||||
|
|
||||||
|
@ -41,4 +41,4 @@ def send_command(engine, context, body, template, service, host, mappings=None,
|
|||||||
host=host, service=service, callback=callback)
|
host=host, service=service, callback=callback)
|
||||||
|
|
||||||
|
|
||||||
xml_code_engine.XmlCodeEngine.register_function(send_command, "send-command")
|
xml_code_engine.XmlCodeEngine.register_function(send_command, "send-command")
|
||||||
|
@ -166,7 +166,6 @@ class Workflow(object):
|
|||||||
|
|
||||||
engine.evaluate_content(empty_handler, context)
|
engine.evaluate_content(empty_handler, context)
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _workflow_func(context, body, engine, **kwargs):
|
def _workflow_func(context, body, engine, **kwargs):
|
||||||
context['/hasSideEffects'] = False
|
context['/hasSideEffects'] = False
|
||||||
|
Loading…
Reference in New Issue
Block a user