screwdriver-queue-service 5.0.0 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/server +1 -1
- package/config/custom-environment-variables.yaml +1 -0
- package/config/default.yaml +2 -0
- package/lib/server.js +1 -1
- package/package.json +1 -1
- package/plugins/queue/index.js +2 -2
- package/plugins/queue/put.js +6 -1
package/bin/server
CHANGED
|
@@ -239,6 +239,7 @@ queue:
|
|
|
239
239
|
prefix: REDIS_QUEUE_PREFIX
|
|
240
240
|
# whether or not to retrieve from redis that the data needed to start periodic builds
|
|
241
241
|
periodicBuildTableEnabled: PERIODIC_BUILD_TABLE_ENABLED
|
|
242
|
+
queueMaxPayloadSize: QUEUE_MAX_PAYLOAD_SIZE
|
|
242
243
|
|
|
243
244
|
plugins:
|
|
244
245
|
blockedBy:
|
package/config/default.yaml
CHANGED
|
@@ -167,6 +167,8 @@ queue:
|
|
|
167
167
|
prefix: ""
|
|
168
168
|
# whether or not to retrieve from redis that the data needed to start periodic builds
|
|
169
169
|
periodicBuildTableEnabled: true
|
|
170
|
+
# max payload size in bytes, default to 10MB
|
|
171
|
+
queueMaxPayloadSize: 10485760
|
|
170
172
|
|
|
171
173
|
plugins:
|
|
172
174
|
blockedBy:
|
package/lib/server.js
CHANGED
package/package.json
CHANGED
package/plugins/queue/index.js
CHANGED
|
@@ -7,7 +7,7 @@ const scheduler = require('./scheduler');
|
|
|
7
7
|
|
|
8
8
|
const queuePlugin = {
|
|
9
9
|
name: 'queue',
|
|
10
|
-
async register(server) {
|
|
10
|
+
async register(server, options) {
|
|
11
11
|
/**
|
|
12
12
|
* Exposes an init function to begin the scheduler process
|
|
13
13
|
* @method init
|
|
@@ -28,7 +28,7 @@ const queuePlugin = {
|
|
|
28
28
|
return scheduler.cleanUp(executor);
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
server.route([putRoute(), deleteRoute(), statsRoute()]);
|
|
31
|
+
server.route([putRoute(options), deleteRoute(), statsRoute()]);
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
|
package/plugins/queue/put.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const logger = require('screwdriver-logger');
|
|
4
4
|
const scheduler = require('./scheduler');
|
|
5
5
|
|
|
6
|
-
module.exports =
|
|
6
|
+
module.exports = options => ({
|
|
7
7
|
method: 'POST',
|
|
8
8
|
path: '/queue/message',
|
|
9
9
|
config: {
|
|
@@ -14,6 +14,11 @@ module.exports = () => ({
|
|
|
14
14
|
strategies: ['token'],
|
|
15
15
|
scope: ['sdapi']
|
|
16
16
|
},
|
|
17
|
+
payload: {
|
|
18
|
+
maxBytes: parseInt(options.queueMaxPayloadSize, 10) || 5242880, // 5MB default
|
|
19
|
+
parse: true,
|
|
20
|
+
output: 'data'
|
|
21
|
+
},
|
|
17
22
|
handler: async (request, h) => {
|
|
18
23
|
try {
|
|
19
24
|
const executor = request.server.app.executorQueue;
|