Skip to content

Commit 16ff650

Browse files
Drop support for SQS queues (#3651)
Using the database queue allows CDash to have more consistent control over the behavior of the queue. Given that this isn't a particularly high-performance queue, the database driver is sufficient for all use cases.
1 parent 6350456 commit 16ff650

File tree

5 files changed

+29
-137
lines changed

5 files changed

+29
-137
lines changed

app/Jobs/ProcessSubmission.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,7 @@ private function requeueSubmissionFile($buildid): bool
100100
// Requeue the file with exponential backoff.
101101
PendingSubmissions::where('buildid', $this->buildid)->increment('numfiles');
102102
$delay = ((int) config('cdash.retry_base')) ** $retry_handler->Retries;
103-
if (config('queue.default') === 'sqs-fifo') {
104-
// Special handling for sqs-fifo, which does not support per-message delays.
105-
sleep(10);
106-
self::dispatch($this->filename, $this->projectid, $buildid, $this->expected_md5);
107-
} else {
108-
self::dispatch($this->filename, $this->projectid, $buildid, $this->expected_md5)->delay(now()->addSeconds($delay));
109-
}
103+
self::dispatch($this->filename, $this->projectid, $buildid, $this->expected_md5)->delay(now()->addSeconds($delay));
110104

111105
return true;
112106
}

composer.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"ext-xsl": "*",
2626
"ext-zlib": "*",
2727
"24slides/laravel-saml2": "2.4.2",
28-
"aws/aws-sdk-php": "3.374.0",
2928
"directorytree/ldaprecord-laravel": "3.4.3",
3029
"guzzlehttp/guzzle": "7.10.0",
3130
"knplabs/github-api": "3.16.0",
@@ -39,7 +38,6 @@
3938
"pear/archive_tar": "1.6.0",
4039
"php-di/php-di": "7.1.1",
4140
"ramsey/uuid": "4.9.2",
42-
"shiftonelabs/laravel-sqs-fifo-queue": "3.0.3",
4341
"socialiteproviders/github": "4.1.0",
4442
"socialiteproviders/gitlab": "4.1.0",
4543
"socialiteproviders/google": "4.1.0",

composer.lock

Lines changed: 26 additions & 96 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/queue.php

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
| is used by your application. A default configuration has been added
2424
| for each back-end shipped with Laravel. You are free to add more.
2525
|
26-
| Drivers: "sync", "database", "beanstalkd", "sqs", "null"
26+
| Drivers: "sync", "database", "null"
2727
|
2828
*/
2929

@@ -38,36 +38,6 @@
3838
'queue' => 'default',
3939
'retry_after' => env('QUEUE_TIMEOUT', 2000) + 60,
4040
],
41-
42-
'beanstalkd' => [
43-
'driver' => 'beanstalkd',
44-
'host' => 'localhost',
45-
'queue' => 'default',
46-
'retry_after' => env('QUEUE_TIMEOUT', 2000) + 60,
47-
],
48-
49-
'sqs' => [
50-
'driver' => 'sqs',
51-
'key' => env('SQS_KEY', 'your-public-key'),
52-
'secret' => env('SQS_SECRET', 'your-secret-key'),
53-
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
54-
'queue' => env('SQS_QUEUE', 'your-queue-name'),
55-
'region' => env('SQS_REGION', 'us-east-1'),
56-
],
57-
58-
'sqs-fifo' => [
59-
'driver' => 'sqs-fifo',
60-
'key' => env('SQS_KEY'),
61-
'secret' => env('SQS_SECRET'),
62-
'prefix' => env('SQS_FIFO_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
63-
'queue' => env('SQS_FIFO_QUEUE', 'default.fifo'),
64-
'suffix' => env('SQS_FIFO_SUFFIX'),
65-
'region' => env('SQS_REGION', 'us-east-1'),
66-
'after_commit' => false,
67-
'group' => 'default',
68-
'deduplicator' => env('SQS_FIFO_DEDUPLICATOR', 'unique'),
69-
'allow_delay' => env('SQS_FIFO_ALLOW_DELAY', false),
70-
],
7141
],
7242

7343
/*

phpstan-baseline.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24165,7 +24165,7 @@ parameters:
2416524165
-
2416624166
rawMessage: Binary operation "+" between 2000|bool|string and 60 results in an error.
2416724167
identifier: binaryOp.invalid
24168-
count: 2
24168+
count: 1
2416924169
path: config/queue.php
2417024170

2417124171
-

0 commit comments

Comments
 (0)