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=array(), $conflictStrategyId=
null)
50 $dependencies[] =
"agent_adj2nest";
53 if ($jobQueueId != 0) {
57 $args = ($conflictStrategyId !==
null) ? $this::CONFLICT_STRATEGY_FLAG.$conflictStrategyId :
'';
59 return $this->
doAgentAdd($jobId, $uploadId, $errorMsg, $dependencies, $uploadId, $args);
63 register_plugin(
new DeciderJobAgentPlugin());
UI plugin for DeciderJobAgent.
AgentAdd($jobId, $uploadId, &$errorMsg, $dependencies=array(), $conflictStrategyId=null)
doAgentAdd($jobId, $uploadId, &$errorMsg, $dependencies, $jqargs="", $jq_cmd_args=null)
IsAlreadyScheduled($job_pk, $AgentName, $upload_pk)
Check if an agent is already scheduled in a job.