kopia lustrzana https://github.com/nextcloud/social
rodzic
005a8c57d0
commit
676ec5acce
|
@ -420,7 +420,6 @@ class LocalController extends Controller {
|
|||
$cached = [];
|
||||
foreach ($documents as $id) {
|
||||
try {
|
||||
|
||||
$document = $this->documentService->cacheRemoteDocument($id);
|
||||
$cached[] = $document;
|
||||
} catch (Exception $e) {
|
||||
|
|
|
@ -151,7 +151,7 @@ class CacheDocumentsRequest extends CacheDocumentsRequestBuilder {
|
|||
$this->limitToDBFieldEmpty($qb, 'local_copy');
|
||||
$this->limitToCaching($qb, self::CACHE_TTL);
|
||||
$this->limitToDBFieldInt($qb, 'error', 0);
|
||||
|
||||
|
||||
$documents = [];
|
||||
$cursor = $qb->execute();
|
||||
while ($data = $cursor->fetch()) {
|
||||
|
|
|
@ -363,9 +363,10 @@ class CoreRequestBuilder {
|
|||
|
||||
/**
|
||||
* @param IQueryBuilder $qb
|
||||
* @param string $order
|
||||
*/
|
||||
protected function orderByPriority(IQueryBuilder &$qb) {
|
||||
$qb->orderBy('priority', 'desc');
|
||||
protected function orderByPriority(IQueryBuilder &$qb, string $order = 'desc') {
|
||||
$qb->orderBy('priority', $order);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -180,9 +180,11 @@ class RequestQueueRequest extends RequestQueueRequestBuilder {
|
|||
*/
|
||||
public function setAsFailure(RequestQueue &$queue) {
|
||||
$qb = $this->getQueueUpdateSql();
|
||||
$qb->set('status', $qb->createNamedParameter(RequestQueue::STATUS_STANDBY));
|
||||
// TODO - increment tries++
|
||||
// ->set('tries', 'tries+1');
|
||||
$func = $qb->func();
|
||||
$expr = $qb->expr();
|
||||
|
||||
$qb->set('status', $qb->createNamedParameter(RequestQueue::STATUS_STANDBY))
|
||||
->set('tries', $func->add('tries', $expr->literal(1)));
|
||||
$this->limitToId($qb, $queue->getId());
|
||||
$this->limitToStatus($qb, RequestQueue::STATUS_RUNNING);
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue