FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\Lib\Dao\ShowJobsDao Class Reference
Collaboration diagram for Fossology\Lib\Dao\ShowJobsDao:
Collaboration graph

Public Member Functions

 __construct (DbManager $dbManager, UploadDao $uploadDao)
 
 uploads2Jobs ($upload_pks, $page=0)
 Find all the jobs for a given set of uploads. More...
 
 getJobName ($uploadId)
 Return job name. Used for deleted jobs. More...
 
 myJobs ($allusers, $page=0)
 Find all of my jobs submitted within the last n hours. More...
 
 getJobInfo ($job_pks)
 Get job queue data from db. More...
 
 getNumItemsPerSec ($itemsprocessed, $numSecs)
 Returns Number of files/items processed per sec. More...
 
 getEstimatedTime ($job_pk, $jq_Type='', $filesPerSec=0, $uploadId=0, $timeInSec=0)
 Returns Estimated time using jobid. More...
 
 getDataForASingleJob ($jq_pk)
 Return total Job data with time elapsed. More...
 
 getJobStatus ($jqPk)
 
 getItemsProcessedForDecider ($jqType, $jobId)
 
 getJobsForAll ()
 

Private Attributes

 $dbManager
 
 $uploadDao
 
 $logger
 
 $maxJobsPerPage = 10
 
 $nhours = 672
 

Detailed Description

Definition at line 15 of file ShowJobsDao.php.

Member Function Documentation

◆ getDataForASingleJob()

Fossology\Lib\Dao\ShowJobsDao::getDataForASingleJob (   $jq_pk)

Return total Job data with time elapsed.

Parameters
$jq_pk
Returns
array

Definition at line 312 of file ShowJobsDao.php.

◆ getEstimatedTime()

Fossology\Lib\Dao\ShowJobsDao::getEstimatedTime (   $job_pk,
  $jq_Type = '',
  $filesPerSec = 0,
  $uploadId = 0,
  $timeInSec = 0 
)

Returns Estimated time using jobid.

Parameters
int$job_pk
string$jq_Type
float$filesPerSec
int$uploadId
Returns
string Returns empty if estimated time is 0 else returns time.

Definition at line 247 of file ShowJobsDao.php.

◆ getItemsProcessedForDecider()

Fossology\Lib\Dao\ShowJobsDao::getItemsProcessedForDecider (   $jqType,
  $jobId 
)
Parameters
$jqType
$jobId
Returns
array

Definition at line 347 of file ShowJobsDao.php.

◆ getJobInfo()

Fossology\Lib\Dao\ShowJobsDao::getJobInfo (   $job_pks)

Get job queue data from db.

Parameters
array$job_pksArray of $job_pk's to display.
Returns
array of job data
JobData [job_pk] Array of job records (JobRec)
JobRec['jobqueue'][jq_pk] = array of JobQueue records
JobRec['jobqueue'][jq_pk]['depends'] = array of jq_pk's for dependencies
JobRec['upload'] = array for upload record
JobRec['job'] = array for job record
JobRec['uploadtree'] = array for parent uploadtree record
JobQueue ['jq_pk'] = jq_pk
JobQueue ['jq_type'] = jq_type
JobQueue ['jq_itemsprocessed'] = jq_itemsprocessed
JobQueue ['jq_starttime'] = jq_starttime
JobQueue ['jq_endtime'] = jq_endtime
JobQueue ['jq_log'] = jq_log
JobQueue ['jq_endtext'] = jq_endtext
JobQueue ['jq_end_bits'] = jq_end_bits
Contains information required by uploadtree elements.
Definition: adj2nest.c:93

Definition at line 157 of file ShowJobsDao.php.

◆ getJobName()

Fossology\Lib\Dao\ShowJobsDao::getJobName (   $uploadId)

Return job name. Used for deleted jobs.

Parameters
upload_pk
Returns
Original job name in job record.

Definition at line 76 of file ShowJobsDao.php.

◆ getJobsForAll()

Fossology\Lib\Dao\ShowJobsDao::getJobsForAll ( )

Get the status of all recent pending or running jobs.

Returns
array Containing job name, number of jobs pending and running

Definition at line 366 of file ShowJobsDao.php.

◆ getJobStatus()

Fossology\Lib\Dao\ShowJobsDao::getJobStatus (   $jqPk)
Parameters
$jqPk
Returns
bool

Definition at line 327 of file ShowJobsDao.php.

◆ getNumItemsPerSec()

Fossology\Lib\Dao\ShowJobsDao::getNumItemsPerSec (   $itemsprocessed,
  $numSecs 
)

Returns Number of files/items processed per sec.

Parameters
int$itemsprocessed
int$numSecs
Returns
double

Definition at line 234 of file ShowJobsDao.php.

◆ myJobs()

Fossology\Lib\Dao\ShowJobsDao::myJobs (   $allusers,
  $page = 0 
)

Find all of my jobs submitted within the last n hours.

Parameters
int$allusersGet data of all users if set to 1.
int$pageGet data for this display page. Starts with zero.
Returns
array of job_pk's and total number of pages created

Definition at line 96 of file ShowJobsDao.php.

◆ uploads2Jobs()

Fossology\Lib\Dao\ShowJobsDao::uploads2Jobs (   $upload_pks,
  $page = 0 
)

Find all the jobs for a given set of uploads.

Parameters
array$upload_pksArray of upload_pk's
int$pageGet data for this display page. Starts with zero.
Returns
array of job_pk's for the uploads

Definition at line 43 of file ShowJobsDao.php.


The documentation for this class was generated from the following file: