summaryrefslogtreecommitdiff
path: root/plugins/jobs/.rr.yaml
blob: 1b84515f2e8ec48f37b2d13b40ef17b144c29e7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
server:
  command: "php worker.php"

jobs:
  # worker pool configuration
  pool:
    num_workers: 4

  # rabbitmq and similar servers
  amqp:
    addr:     amqp://guest:guest@localhost:5672/

  # beanstalk configuration
  beanstalk:
    addr:    tcp://localhost:11300

  # amazon sqs configuration
  sqs:
    key:      api-key
    secret:   api-secret
    region:   us-west-1
    endpoint: http://localhost:9324

  # job destinations and options
  dispatch:
    spiral-jobs-tests-amqp-*.pipeline:      amqp
    spiral-jobs-tests-local-*.pipeline:     local
    spiral-jobs-tests-beanstalk-*.pipeline: beanstalk
    spiral-jobs-tests-sqs-*.pipeline:       sqs

  # list of broker pipelines associated with endpoints
  pipelines:
    local:
      broker: ephemeral

    amqp:
      broker: amqp
      queue:  default

    beanstalk:
      broker: beanstalk
      tube:   default

    sqs:
      broker: sqs
      queue:  default
      declare:
        MessageRetentionPeriod: 86400

  # list of pipelines to be consumed by the server, keep empty if you want to start consuming manually
  consume: ["local", "amqp", "beanstalk", "sqs"]


# monitors rr server(s)
limit:
  # check worker state each second
  interval: 1

  # custom watch configuration for each service
  services:
    # monitor queue workers
    jobs:
      # maximum allowed memory consumption per worker (soft)
      maxMemory: 100

      # maximum time to live for the worker (soft)
      TTL: 0

      # maximum allowed amount of time worker can spend in idle before being removed (for weak db connections, soft)
      idleTTL: 0

      # max_execution_time (brutal)
      execTTL: 60