mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-14 17:55:55 -07:00
Flow Run Health Check updates stats and queues
This commit is contained in:
parent
e142db1892
commit
80563106dd
2 changed files with 14 additions and 1 deletions
|
|
@ -97,11 +97,22 @@ const plugin = async (args:IpluginInputArgs):Promise<IpluginOutputArgs> => {
|
|||
|
||||
const res = await cli.runCli();
|
||||
|
||||
// Added in 2.19.01
|
||||
if (typeof args.updateStat !== 'undefined') {
|
||||
await args.updateStat(args.originalLibraryFile.DB, 'totalHealthCheckCount', 1);
|
||||
}
|
||||
|
||||
if (res.cliExitCode !== 0) {
|
||||
args.jobLog('Running CLI failed');
|
||||
args.logOutcome('hErr');
|
||||
throw new Error('Running CLI failed');
|
||||
}
|
||||
|
||||
args.logOutcome('hSuc');
|
||||
|
||||
// will cause item to go into the health check success table
|
||||
args.variables.healthCheck = 'Success';
|
||||
|
||||
return {
|
||||
outputFileObj: args.inputFileObj,
|
||||
outputNumber: 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue