8 namespace Fossology\Lib\Dao;
20 function __construct(
DbManager $dbManager, Logger $logger)
23 $this->logger = $logger;
26 public function getAllJobStatus($uploadId, $userId, $groupId)
31 "SELECT jobqueue.jq_pk as jq_pk,
32 jobqueue.jq_end_bits as end_bits
35 ON jobqueue.jq_job_fk = job.job_pk
36 LEFT JOIN group_user_member gm
37 ON gm.user_fk = job_user_fk
38 WHERE job.job_upload_fk = $1
40 OR gm.group_fk = $3)");
42 $res = $this->
dbManager->execute($stmt, array($uploadId, $userId, $groupId));
43 while ($row = $this->
dbManager->fetchArray($res)) {
44 $result[$row[
'jq_pk']] = $row[
'end_bits'];
51 public function getChlidJobStatus($jobId)
56 "SELECT jobqueue.jq_pk as jq_pk,
57 jobqueue.jq_end_bits as end_bits
59 WHERE jq_job_fk = $1");
61 $res = $this->
dbManager->execute($stmt, array($jobId));
62 while ($row = $this->
dbManager->fetchArray($res)) {
63 $result[$row[
'jq_pk']] = $row[
'end_bits'];
70 public function hasActionPermissionsOnJob($jobId, $userId, $groupId)
77 LEFT JOIN group_user_member gm
78 ON gm.user_fk = job_user_fk
81 OR gm.group_fk = $3)");
83 $res = $this->
dbManager->execute($stmt, array($jobId, $userId, $groupId));
84 while ($row = $this->
dbManager->fetchArray($res)) {
85 $result[$row[
'jq_pk']] = $row[
'end_bits'];
fo_dbManager * dbManager
fo_dbManager object