16 include_once(__DIR__ .
"/../agent/version.php");
24 const CONFLICT_STRATEGY_FLAG =
"-k";
26 function __construct()
28 $this->Name =
"agent_deciderjob";
29 $this->Title = _(
"Automatic User License Decider");
30 $this->AgentName = AGENT_DECIDER_JOB_NAME;
32 parent::__construct();
48 public function AgentAdd($jobId, $uploadId, &$errorMsg, $dependencies=[],
49 $arguments=
null, $request=
null, $unpackArgs=
null)
51 $dependencies[] =
"agent_adj2nest";
54 if ($jobQueueId != 0) {
58 $args = ($arguments !==
null) ? $this::CONFLICT_STRATEGY_FLAG.$arguments :
'';
60 return $this->
doAgentAdd($jobId, $uploadId, $errorMsg, $dependencies,
61 $uploadId, $args, $request);
65 register_plugin(
new DeciderJobAgentPlugin());
UI plugin for DeciderJobAgent.
AgentAdd($jobId, $uploadId, &$errorMsg, $dependencies=[], $arguments=null, $request=null, $unpackArgs=null)
doAgentAdd($jobId, $uploadId, &$errorMsg, $dependencies, $jqargs="", $jq_cmd_args=null, $request=null)
IsAlreadyScheduled($job_pk, $AgentName, $upload_pk)
Check if an agent is already scheduled in a job.