mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #27684 from rallytime/bp-27656
Back-port #27656 to 2015.5
This commit is contained in:
commit
f9ddd4647f
1 changed files with 3 additions and 7 deletions
|
@ -56,6 +56,8 @@ and then:
|
|||
--
|
||||
-- Table structure for table 'salt_returns'
|
||||
--
|
||||
-- note that 'success' must not have NOT NULL constraint, since
|
||||
-- some functions don't provide it.
|
||||
|
||||
DROP TABLE IF EXISTS salt_returns;
|
||||
CREATE TABLE salt_returns (
|
||||
|
@ -200,12 +202,6 @@ def returner(load):
|
|||
'''
|
||||
Return data to a postgres server
|
||||
'''
|
||||
# salt guarantees that there will be 'fun', 'jid', 'return' and 'id' but not
|
||||
# 'success'
|
||||
success = 'Unknown'
|
||||
if 'success' in load:
|
||||
success = load['success']
|
||||
|
||||
conn = _get_conn()
|
||||
if conn is None:
|
||||
return None
|
||||
|
@ -219,7 +215,7 @@ def returner(load):
|
|||
load['jid'],
|
||||
json.dumps(unicode(str(load['return']), 'utf-8', 'replace')),
|
||||
load['id'],
|
||||
success
|
||||
load.get('success'),
|
||||
)
|
||||
)
|
||||
_close_conn(conn)
|
||||
|
|
Loading…
Add table
Reference in a new issue