Queue improvements

This commit is contained in:
Dmitry Khomutov 2017-02-01 21:53:31 +07:00
commit 7e735bbb3b
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9
18 changed files with 65 additions and 43 deletions

View file

@ -85,7 +85,14 @@ class BuildStoreBase extends Store
/**
* Get multiple Build by Status.
*
* @param $value
* @param int $limit
* @param string $useConnection
*
* @return array
*
* @throws HttpException
*/
public function getByStatus($value, $limit = 1000, $useConnection = 'read')
{
@ -93,7 +100,6 @@ class BuildStoreBase extends Store
throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.');
}
$query = 'SELECT * FROM {{build}} WHERE {{status}} = :status LIMIT :limit';
$stmt = Database::getConnection($useConnection)->prepareCommon($query);
$stmt->bindValue(':status', $value);