Skip to content

Commit 1d276bb

Browse files
Merge pull request #2020 from williamjallen/3.2-to-3.3-for-rc2
Merge patches from 3.2 into 3.3
2 parents bb1df5f + 6bb3b01 commit 1d276bb

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

app/Jobs/ProcessSubmission.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,14 @@ private function requeueSubmissionFile($buildid): bool
9494
// Requeue the file with exponential backoff.
9595
PendingSubmissions::IncrementForBuildId($this->buildid);
9696
$delay = pow(config('cdash.retry_base'), $retry_handler->Retries);
97-
self::dispatch($this->filename, $this->projectid, $buildid, md5_file(Storage::path("inbox/{$this->filename}")))->delay(now()->addSeconds($delay));
97+
if (config('queue.default') === 'sqs-fifo') {
98+
// Special handling for sqs-fifo, which does not support per-message delays.
99+
sleep(10);
100+
self::dispatch($this->filename, $this->projectid, $buildid, md5_file(Storage::path("inbox/{$this->filename}")));
101+
} else {
102+
self::dispatch($this->filename, $this->projectid, $buildid, md5_file(Storage::path("inbox/{$this->filename}")))->delay(now()->addSeconds($delay));
103+
}
104+
98105
return true;
99106
}
100107
}

app/cdash/include/autoremove.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,16 @@ function removeFirstBuilds($projectid, $days, $maxbuilds, $force = false, $echo
9191

9292
add_log('about to query for builds to remove', 'removeFirstBuilds');
9393
$db = Database::getInstance();
94-
$builds = $db->executePrepared('
94+
$builds = $db->executePrepared("
9595
SELECT id
9696
FROM build
9797
WHERE
9898
parentid IN (0, -1)
9999
AND starttime<?
100100
AND projectid=?
101101
ORDER BY starttime ASC
102-
LIMIT 10
103-
', [$startdate, intval($projectid)]);
102+
LIMIT $maxbuilds
103+
", [$startdate, intval($projectid)]);
104104
add_last_sql_error('dailyupdates::removeFirstBuilds');
105105

106106
$buildids = [];

0 commit comments

Comments
 (0)