FOSSology
3.2.0rc1
Open Source License Compliance by Open Source Software
|
Controller for Job model. More...
Public Member Functions | |
getJobs ($request, $response, $args) | |
createJob ($request, $response, $args) | |
Public Member Functions inherited from Fossology\UI\Api\Controllers\RestController | |
__construct ($container) | |
Public Attributes | |
const | UPLOAD_PARAM = "upload" |
const | JOB_COMPLETED = 0x1 << 1 |
const | JOB_STARTED = 0x1 << 2 |
const | JOB_QUEUED = 0x1 << 3 |
const | JOB_FAILED = 0x1 << 4 |
Private Member Functions | |
getAllResults ($id, $response, $limit, $page) | |
getFilteredResults ($uploadId, $response, $limit, $page) | |
updateEtaAndStatus (&$job) | |
getUploadEtaInSeconds ($jobId, $uploadId) | |
getJobStatus ($jobqueue) | |
Additional Inherited Members | |
Protected Attributes inherited from Fossology\UI\Api\Controllers\RestController | |
$container | |
$restHelper | |
$dbHelper | |
Controller for Job model.
Definition at line 40 of file JobController.php.
Fossology\UI\Api\Controllers\JobController::createJob | ( | $request, | |
$response, | |||
$args | |||
) |
Create a new job
ServerRequestInterface | $request | |
ResponseInterface | $response | |
array | $args |
Definition at line 123 of file JobController.php.
|
private |
Get all jobs for the current user.
integer | null | $id | Specific job id or null for all jobs |
ResponseInterface | $response | Response object |
integer | $limit | Limit of jobs per page |
integer | $page | Page number required |
Definition at line 179 of file JobController.php.
|
private |
Get all jobs for the given upload.
integer | $uploadId | Upload id to be filtered |
ResponseInterface | $response | Response object |
integer | $limit | Limit of jobs per page |
integer | $page | Page number required |
Definition at line 202 of file JobController.php.
Fossology\UI\Api\Controllers\JobController::getJobs | ( | $request, | |
$response, | |||
$args | |||
) |
Get all jobs by a user
ServerRequestInterface | $request | |
ResponseInterface | $response | |
array | $args |
Definition at line 70 of file JobController.php.
|
private |
Get the job status based on jobqueue.
array | $jobqueue | The job queue with job id as values |
Definition at line 277 of file JobController.php.
|
private |
Get the ETA in seconds for the upload.
integer | $jobId | The job ID for which the ETA is required |
integer | $uploadId | Upload for which the ETA is required |
Definition at line 258 of file JobController.php.
|
private |
Update the ETA and status for the given job
[in,out] | Job | $job | The job to be updated |
Definition at line 223 of file JobController.php.
const Fossology\UI\Api\Controllers\JobController::JOB_COMPLETED = 0x1 << 1 |
Job completed successfully
Definition at line 49 of file JobController.php.
const Fossology\UI\Api\Controllers\JobController::JOB_FAILED = 0x1 << 4 |
Job failed
Definition at line 61 of file JobController.php.
const Fossology\UI\Api\Controllers\JobController::JOB_QUEUED = 0x1 << 3 |
Job waiting to be queued
Definition at line 57 of file JobController.php.
const Fossology\UI\Api\Controllers\JobController::JOB_STARTED = 0x1 << 2 |
Job started by scheduler
Definition at line 53 of file JobController.php.
const Fossology\UI\Api\Controllers\JobController::UPLOAD_PARAM = "upload" |
Get query parameter name for upload filtering
Definition at line 45 of file JobController.php.