public function getJobListFilter($type = null, $includeUpUntil = 0)
    {
        $util = singleton(QJUtils::class);

        $filter = ['JobStatus <>' => QueuedJob::STATUS_COMPLETE];
        if ($includeUpUntil) {
            $filter['JobFinished > '] = DBDatetime::create()->setValue(
                DBDatetime::now()->getTimestamp() - $includeUpUntil
            )->Rfc2822();
        }

        $filter = $util->dbQuote($filter, ' OR ');

        if ($type) {
            $filter = $util->dbQuote(['JobType =' => (string)$type]) . ' AND (' . $filter . ')';
        }

        return $filter;
    }
public function getJobListFilter($type = null, $includeUpUntil = 0)
    {
        $util = singleton(QJUtils::class);

        $filter = ['JobStatus <>' => QueuedJob::STATUS_COMPLETE];
        if ($includeUpUntil) {
            $filter['JobFinished > '] = DBDatetime::create()->setValue(
                DBDatetime::now()->getTimestamp() - $includeUpUntil
            )->Rfc2822();
        }

        $filter = $util->dbQuote($filter, ' OR ');

        if ($type) {
            $filter = $util->dbQuote(['JobType =' => (string)$type]) . ' AND (' . $filter . ')';
        }

        return $filter;
    }
public function getJobListFilter ( $ type = null , $ includeUpUntil = 0 ) { $ util = singleton ( QJUtils :: class ) ; $ filter = [ 'JobStatus <>' => QueuedJob :: STATUS_COMPLETE ] ; if ( $ includeUpUntil ) { $ filter [ 'JobFinished > ' ] = DBDatetime :: create ( ) -> setValue ( DBDatetime :: now ( ) -> getTimestamp ( ) - $ includeUpUntil ) -> Rfc2822 ( ) ; } $ filter = $ util -> dbQuote ( $ filter , ' OR ' ) ; if ( $ type ) { $ filter = $ util -> dbQuote ( [ 'JobType =' => ( string ) $ type ] ) . ' AND (' . $ filter . ')' ; } return $ filter ; }
Return the SQL filter used to get the job list - this is used by the UI for displaying the job list...

@param string $type
if we're after a particular job list
@param int $includeUpUntil
The number of seconds to include jobs that have just finished, allowing a job list to be built that
includes recently finished jobs

@return string
Return the SQL filter used to get the job list - this is used by the UI for displaying the job list ...