14 private $monkDesc =
"Scan files for licenses using text comparison method";
16 public function __construct()
18 $this->Name =
"agent_monk";
19 $this->Title = _(
"Monk License Analysis <img src=\"images/info_16.png\" data-toggle=\"tooltip\" title=\"".$this->monkDesc.
"\" class=\"info-bullet\"/>");
20 $this->AgentName =
"monk";
22 parent::__construct();
27 return CheckARS($uploadId, $this->AgentName,
"monk agent",
"monk_ars");
34 public function AgentAdd($jobId, $uploadId, &$errorMsg, $dependencies=[],
35 $arguments=
null, $request=
null, $unpackArgs=
null)
37 if ($request !=
null && !is_array($request)) {
38 $unpackArgs = intval($request->get(
'scm', 0)) == 1 ?
'-I' :
'';
40 $unpackArgs = intval(@$_POST[
'scm']) == 1 ?
'-I' :
'';
47 if ($jobQueueId != 0) {
52 if (!empty($unpackArgs)) {
53 return $this->
doAgentAdd($jobId, $uploadId, $errorMsg, array(
"agent_mimetype"),$uploadId,$args,$request);
55 return $this->
doAgentAdd($jobId, $uploadId, $errorMsg, array(
"agent_adj2nest"), $uploadId,
null, $request);
67 foreach ($dependencies as $dependency) {
68 if ($dependency == $agentName) {
71 if (is_array($dependency) && $agentName == $dependency[
'name']) {
doAgentAdd($jobId, $uploadId, &$errorMsg, $dependencies, $jqargs="", $jq_cmd_args=null, $request=null)
isAgentIncluded($dependencies, $agentName)
AgentHasResults($uploadId=0)
AgentAdd($jobId, $uploadId, &$errorMsg, $dependencies=[], $arguments=null, $request=null, $unpackArgs=null)
CheckARS($upload_pk, $AgentName, $AgentDesc, $AgentARSTableName)
Check the ARS table to see if an agent has successfully scanned an upload.
IsAlreadyScheduled($job_pk, $AgentName, $upload_pk)
Check if an agent is already scheduled in a job.