|
|
@ -46,11 +46,7 @@ const execModuleSubroutine = ( |
|
|
|
spawnSyncOptions, |
|
|
|
spawnSyncOptions, |
|
|
|
subModuleName, |
|
|
|
subModuleName, |
|
|
|
subParams, |
|
|
|
subParams, |
|
|
|
}: { |
|
|
|
}: ExecModuleSubroutineOptions = {}, |
|
|
|
spawnSyncOptions?: SpawnSyncOptions; |
|
|
|
|
|
|
|
subModuleName?: string; |
|
|
|
|
|
|
|
subParams?: Record<string, unknown>; |
|
|
|
|
|
|
|
} = {}, |
|
|
|
|
|
|
|
) => { |
|
|
|
) => { |
|
|
|
const args = ['--sub', subName]; |
|
|
|
const args = ['--sub', subName]; |
|
|
|
|
|
|
|
|
|
|
@ -78,6 +74,9 @@ const execModuleSubroutine = ( |
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const dbInsertOrUpdateJob = (options?: ExecModuleSubroutineOptions) => |
|
|
|
|
|
|
|
execModuleSubroutine('insert_or_update_jobs', options).stdout; |
|
|
|
|
|
|
|
|
|
|
|
const dbJobAnvilSyncShared = ( |
|
|
|
const dbJobAnvilSyncShared = ( |
|
|
|
jobName: string, |
|
|
|
jobName: string, |
|
|
|
jobData: string, |
|
|
|
jobData: string, |
|
|
@ -110,7 +109,7 @@ const dbJobAnvilSyncShared = ( |
|
|
|
subParams.job_host_uuid = jobHostUUID; |
|
|
|
subParams.job_host_uuid = jobHostUUID; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return execModuleSubroutine('insert_or_update_jobs', { subParams }).stdout; |
|
|
|
return dbInsertOrUpdateJob({ subParams }); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const dbQuery = (query: string, options?: SpawnSyncOptions) => { |
|
|
|
const dbQuery = (query: string, options?: SpawnSyncOptions) => { |
|
|
@ -146,6 +145,7 @@ const getLocalHostUUID = () => |
|
|
|
}).stdout; |
|
|
|
}).stdout; |
|
|
|
|
|
|
|
|
|
|
|
export { |
|
|
|
export { |
|
|
|
|
|
|
|
dbInsertOrUpdateJob as job, |
|
|
|
dbJobAnvilSyncShared, |
|
|
|
dbJobAnvilSyncShared, |
|
|
|
dbQuery, |
|
|
|
dbQuery, |
|
|
|
dbSubRefreshTimestamp, |
|
|
|
dbSubRefreshTimestamp, |
|
|
|