screwdriver-queue-service 5.0.1 → 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 CHANGED
@@ -18,6 +18,6 @@ const authConfig = config.get('auth');
18
18
  server({
19
19
  httpd: httpdConfig,
20
20
  ecosystem,
21
- queueConfig,
21
+ queue: queueConfig,
22
22
  auth: authConfig
23
23
  });
@@ -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:
@@ -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
@@ -59,7 +59,7 @@ module.exports = async config => {
59
59
  // Setup Executor
60
60
  const executor = new ExecutorQueue({
61
61
  ecosystem: hoek.clone(config.ecosystem),
62
- ...config.queueConfig
62
+ ...config.queue
63
63
  });
64
64
 
65
65
  server.app = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-queue-service",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "Screwdriver Queue Service API",
5
5
  "main": "app.js",
6
6
  "directories": {
@@ -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
 
@@ -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;