FOSSology  3.2.0rc1
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)
 Return boolean. More...
 
 getItemsProcessedForDecider ($jqType, $jobId)
 Return array. More...
 
 getJobsForAll ()
 

Private Attributes

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

Detailed Description

Definition at line 27 of file ShowJobsDao.php.

Member Function Documentation

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

Return total Job data with time elapsed.

Parameters
$job_pk
Returns
$row

Definition at line 326 of file ShowJobsDao.php.

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
Returns empty if estimated time is 0 else returns time.

Definition at line 260 of file ShowJobsDao.php.

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

Return array.

Parameters
$jobId
$jqType

Definition at line 361 of file ShowJobsDao.php.

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

Definition at line 169 of file ShowJobsDao.php.

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 88 of file ShowJobsDao.php.

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

Get the status of all pending or running jobs.

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

Definition at line 380 of file ShowJobsDao.php.

Fossology\Lib\Dao\ShowJobsDao::getJobStatus (   $jqPk)

Return boolean.

Parameters
$jq_pk

Definition at line 341 of file ShowJobsDao.php.

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 246 of file ShowJobsDao.php.

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 108 of file ShowJobsDao.php.

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 55 of file ShowJobsDao.php.


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