Commit e5d0f65c authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_crm: include_message as optional on the return

This makes the ease to get the message, on certain special cases.
parent 2ef87b68
......@@ -9,6 +9,8 @@ if context.getAggregateValue(portal_type="Computer Partition") is not None:
try:
d = memcached_dict[context.getReference()]
except KeyError:
if include_message:
return "Not possible to connect"
return
d = json.loads(d)
......@@ -17,8 +19,11 @@ if context.getAggregateValue(portal_type="Computer Partition") is not None:
# Optimise by checking memcache information first.
if result.startswith('#error '):
return last_contact
return result
# XXX time limit of 48 hours for run at least once.
if include_message:
return result
return None
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
<value> <string>include_message=False</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment