24 public function __construct()
26 $this->Name =
"agent_monk";
27 $this->Title = _(
"Monk License Analysis, scanning for licenses performing a text comparison");
28 $this->AgentName =
"monk";
30 parent::__construct();
33 function AgentHasResults($uploadId=0)
35 return CheckARS($uploadId, $this->AgentName,
"monk agent",
"monk_ars");
42 public function AgentAdd($jobId, $uploadId, &$errorMsg, $dependencies=array(), $arguments=null)
44 $unpackArgs = intval(@$_POST[
'scm']) == 1 ?
'-I' :
'';
45 if ($this->AgentHasResults($uploadId) == 1) {
50 if ($jobQueueId != 0) {
55 if (!empty($unpackArgs)) {
56 return $this->
doAgentAdd($jobId, $uploadId, $errorMsg, array(
"agent_mimetype"),$uploadId,$args);
58 return $this->
doAgentAdd($jobId, $uploadId, $errorMsg, array(
"agent_adj2nest"), $uploadId);
70 foreach ($dependencies as $dependency) {
71 if ($dependency == $agentName) {
74 if (is_array($dependency) && $agentName == $dependency[
'name']) {
IsAlreadyScheduled($job_pk, $AgentName, $upload_pk)
Check if an agent is already scheduled in a job.
CheckARS($upload_pk, $AgentName, $AgentDesc, $AgentARSTableName)
Check the ARS table to see if an agent has successfully scanned an upload.
AgentAdd($jobId, $uploadId, &$errorMsg, $dependencies=array(), $arguments=null)
isAgentIncluded($dependencies, $agentName)
doAgentAdd($jobId, $uploadId, &$errorMsg, $dependencies, $jqargs="", $jq_cmd_args=null)