mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Configure Inspector with a proper configuration
This commit is contained in:
parent
aed8410398
commit
82ed36ef00
@ -237,12 +237,13 @@ def snapshots():
|
||||
salt myminion inspector.snapshots
|
||||
'''
|
||||
try:
|
||||
return _("collector").Inspector().db.list()
|
||||
return _("collector").Inspector(cachedir=__opts__['cachedir'],
|
||||
piddir=os.path.dirname(__opts__['pidfile'])).db.list()
|
||||
except InspectorSnapshotException as err:
|
||||
raise CommandExecutionError(err)
|
||||
raise CommandExecutionError(err)
|
||||
except Exception as err:
|
||||
log.error(_get_error_message(err))
|
||||
raise Exception(err)
|
||||
log.error(_get_error_message(err))
|
||||
raise Exception(err)
|
||||
|
||||
|
||||
def delete(*databases):
|
||||
@ -261,9 +262,10 @@ def delete(*databases):
|
||||
|
||||
try:
|
||||
ret = dict()
|
||||
inspector = _("collector").Inspector()
|
||||
inspector = _("collector").Inspector(cachedir=__opts__['cachedir'],
|
||||
piddir=os.path.dirname(__opts__['pidfile']))
|
||||
for dbid in databases:
|
||||
ret[dbid] = inspector.db.purge(dbid)
|
||||
ret[dbid] = inspector.db._db.purge(str(dbid))
|
||||
return ret
|
||||
except InspectorSnapshotException as err:
|
||||
raise CommandExecutionError(err)
|
||||
|
Loading…
Reference in New Issue
Block a user