Skip to content

Commit

Permalink
Merge pull request #2020 from williamjallen/3.2-to-3.3-for-rc2
Browse files Browse the repository at this point in the history
Merge patches from 3.2 into 3.3
  • Loading branch information
williamjallen committed Feb 8, 2024
2 parents bb1df5f + 6bb3b01 commit 1d276bb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion app/Jobs/ProcessSubmission.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,14 @@ private function requeueSubmissionFile($buildid): bool
// Requeue the file with exponential backoff.
PendingSubmissions::IncrementForBuildId($this->buildid);
$delay = pow(config('cdash.retry_base'), $retry_handler->Retries);
self::dispatch($this->filename, $this->projectid, $buildid, md5_file(Storage::path("inbox/{$this->filename}")))->delay(now()->addSeconds($delay));
if (config('queue.default') === 'sqs-fifo') {
// Special handling for sqs-fifo, which does not support per-message delays.
sleep(10);
self::dispatch($this->filename, $this->projectid, $buildid, md5_file(Storage::path("inbox/{$this->filename}")));
} else {
self::dispatch($this->filename, $this->projectid, $buildid, md5_file(Storage::path("inbox/{$this->filename}")))->delay(now()->addSeconds($delay));
}

return true;
}
}
Expand Down
6 changes: 3 additions & 3 deletions app/cdash/include/autoremove.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ function removeFirstBuilds($projectid, $days, $maxbuilds, $force = false, $echo

add_log('about to query for builds to remove', 'removeFirstBuilds');
$db = Database::getInstance();
$builds = $db->executePrepared('
$builds = $db->executePrepared("
SELECT id
FROM build
WHERE
parentid IN (0, -1)
AND starttime<?
AND projectid=?
ORDER BY starttime ASC
LIMIT 10
', [$startdate, intval($projectid)]);
LIMIT $maxbuilds
", [$startdate, intval($projectid)]);
add_last_sql_error('dailyupdates::removeFirstBuilds');

$buildids = [];
Expand Down

0 comments on commit 1d276bb

Please sign in to comment.