funktor 0.7.22 → 0.7.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7520afb50696ff87dea49311326fa2fcb9854c0ba0fd0e25606020853d4689f9
4
- data.tar.gz: d8f6d65f0a4b6043877b6a9c3eca935bf5ce4175def15325a65126f2bf924512
3
+ metadata.gz: 4efb77bf5008c8b7045610883ea0f0229a8ebaa89d1b5f3dd4846c3e0bc7ddd4
4
+ data.tar.gz: ad9b24108efdc8747d863bc9afbf0b47fe9508c6804f48ca80eba314e681a474
5
5
  SHA512:
6
- metadata.gz: f589c07aa5dc31024832ea9ea8a19443e17e617fec6f2be326368b9de613d368e8bd49e9cfdab96df276e30cabe789e55e60e0c057b9bc6570732ed6cd5b1e1d
7
- data.tar.gz: 85598ac421868b79fbd5f5869db78e4a4369cf0a7a8d0f4c36e51915bb27849665db340fb4512658b51daeec20f1246a6dbf483feea920ab9245ba34395b59c2
6
+ metadata.gz: a1d9c1547d1195bab096469043bef6bd63d4183b005a1ee6e08d60ad5f894fe79d0bdeaa33a446966566904a99a088045c66348f0eb9ca5aca1543b75adf9595
7
+ data.tar.gz: ead715f1b9673487067fea8206e0bb9a0fb74bcc2a79e43bf3e07703df9a5d3f0fc3361bcde55357ef223078ed7dc1e215d325354614f379138142cc33e07bc3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- funktor (0.7.22)
4
+ funktor (0.7.25)
5
5
  activesupport
6
6
  aws-sdk-dynamodb (~> 1.62)
7
7
  aws-sdk-sqs (~> 1.37)
@@ -22,7 +22,7 @@ GEM
22
22
  addressable (2.8.0)
23
23
  public_suffix (>= 2.0.2, < 5.0)
24
24
  aws-eventstream (1.2.0)
25
- aws-partitions (1.595.0)
25
+ aws-partitions (1.596.0)
26
26
  aws-sdk-core (3.131.1)
27
27
  aws-eventstream (~> 1, >= 1.0.2)
28
28
  aws-partitions (~> 1, >= 1.525.0)
@@ -8,7 +8,7 @@ FROM public.ecr.aws/lambda/ruby:2.7 AS build_image
8
8
  #ENV BUNDLE_GEM__FURY__IO=${BUNDLE_GEM__FURY__IO}
9
9
 
10
10
  # First we install some stuff that we need for gems that have to compile native extensions
11
- #RUN yum groupinstall "Development Tools" -y
11
+ RUN yum groupinstall "Development Tools" -y
12
12
  #RUN yum install -y amazon-linux-extras
13
13
  #RUN amazon-linux-extras enable postgresql11
14
14
  #RUN yum install -y postgresql-devel
@@ -57,6 +57,12 @@ FROM public.ecr.aws/lambda/ruby:2.7 AS deploy_image
57
57
  COPY --from=build_image /var/task .
58
58
  COPY . .
59
59
 
60
+ # Now we prime the bootsnap cache to minimize cold start times.
61
+
62
+ ENV BOOTSNAP_CACHE_DIR=/var/task/tmp/cache
63
+ RUN bundle exec bootsnap precompile --gemfile . \
64
+ && SKIP_ENV=true bundle exec ruby lambda_event_handlers/incoming_job_handler.rb
65
+
60
66
  # And finally we have the CMD for the deployed container
61
67
  # You can overwrite command in `serverless.yml` template
62
68
  CMD [ "app.LambdaFunction::Handler.process" ]
@@ -23,3 +23,5 @@ gem 'aws-sdk-dynamodb', '~> 1.62'
23
23
  gem "activesupport"
24
24
  gem "thor" # Thor drives the CLI TODO - Maybe we don't need it here?
25
25
 
26
+ # This helps make cold starts faster
27
+ gem 'bootsnap', require: false
@@ -22,11 +22,14 @@ GEM
22
22
  aws-sigv4 (~> 1.1)
23
23
  aws-sigv4 (1.2.4)
24
24
  aws-eventstream (~> 1, >= 1.0.2)
25
+ bootsnap (1.12.0)
26
+ msgpack (~> 1.2)
25
27
  concurrent-ruby (1.1.9)
26
28
  i18n (1.8.10)
27
29
  concurrent-ruby (~> 1.0)
28
30
  jmespath (1.4.0)
29
31
  minitest (5.14.4)
32
+ msgpack (1.5.2)
30
33
  require_all (1.5.0)
31
34
  thor (1.1.0)
32
35
  tzinfo (2.0.4)
@@ -41,6 +44,7 @@ DEPENDENCIES
41
44
  activesupport
42
45
  aws-sdk-dynamodb (~> 1.62)
43
46
  aws-sdk-sqs (~> 1.37)
47
+ bootsnap
44
48
  require_all (~> 1.0)
45
49
  thor
46
50
 
@@ -5,6 +5,9 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
5
5
  require "rubygems"
6
6
  require 'bundler/setup'
7
7
 
8
+ # load bootsnap for faster cold starts
9
+ require 'bootsnap/setup'
10
+
8
11
  # Set up gems listed in the Gemfile.
9
12
  Bundler.require(:default, :production)
10
13
 
@@ -1363,7 +1363,8 @@ Resources:
1363
1363
  "metrics": [
1364
1364
  [ "AWS/Lambda", "Errors", "FunctionName", "${self:custom.funktor.IncomingJobHandlerName}", { "id": "errors", "stat": "Sum", "color": "#d13212" } ],
1365
1365
  [ ".", "Invocations", ".", ".", { "id": "invocations", "stat": "Sum", "visible": false } ],
1366
- [ { "expression": "100 - 100 * errors / MAX([errors, invocations])", "label": "Success rate (%)", "id": "availability", "yAxis": "right", "region": "us-east-1" } ]
1366
+ [ { "expression": "100 - 100 * errors / MAX([errors, invocations])", "label": "Success rate (%)", "id": "availability", "yAxis": "right", "region": "us-east-1" } ],
1367
+ [ "AWS/Lambda", "Throttles", "FunctionName", "${self:custom.funktor.IncomingJobHandlerName}", { "id": "throttles", "color": "#ff7f0e" } ]
1367
1368
  ],
1368
1369
  "region": "us-east-1",
1369
1370
  "title": "Incoming Job Handler Error count and success rate (%)",
@@ -1424,7 +1425,7 @@ Resources:
1424
1425
  "y": 59,
1425
1426
  "x": 19,
1426
1427
  "properties": {
1427
- "query": "SOURCE '/aws/lambda/${self:custom.funktor.IncomingJobHandlerName}' | fields @initDuration\n| filter ispresent(@initDuration)\n| stats pct(@initDuration, 5) as p5,\n\n\n\n pct(@initDuration, 50) as p50,\n\n\n\n pct(@initDuration, 95) as p95,\n\n\n\n pct(@initDuration, 99) as p99\n\n\n\n by bin(20m)\n",
1428
+ "query": "SOURCE '/aws/lambda/${self:custom.funktor.IncomingJobHandlerName}' | fields @initDuration\n| filter ispresent(@initDuration)\n| stats pct(@initDuration, 5) as p5,\n\n\n\n pct(@initDuration, 50) as p50,\n\n\n\n pct(@initDuration, 95) as p95,\n\n\n\n pct(@initDuration, 99) as p99\n\n\n\n by bin(1m)\n",
1428
1429
  "region": "us-east-1",
1429
1430
  "stacked": false,
1430
1431
  "view": "timeSeries",
@@ -1545,7 +1546,8 @@ Resources:
1545
1546
  [ "AWS/Lambda", "Errors", "FunctionName",
1546
1547
  "${self:custom.funktor.DefaultQueueHandlerName}", { "id": "errors", "stat": "Sum", "color": "#d13212" } ],
1547
1548
  [ ".", "Invocations", ".", ".", { "id": "invocations", "stat": "Sum", "visible": false } ],
1548
- [ { "expression": "100 - 100 * errors / MAX([errors, invocations])", "label": "Success rate (%)", "id": "availability", "yAxis": "right", "region": "us-east-1" } ]
1549
+ [ { "expression": "100 - 100 * errors / MAX([errors, invocations])", "label": "Success rate (%)", "id": "availability", "yAxis": "right", "region": "us-east-1" } ],
1550
+ [ "AWS/Lambda", "Throttles", "FunctionName", "${self:custom.funktor.DefaultQueueHandlerName}", { "id": "throttles", "color": "#ff7f0e" } ]
1549
1551
  ],
1550
1552
  "region": "us-east-1",
1551
1553
  "title": "Default Queue Handler Error count and success rate (%)",
@@ -1607,7 +1609,7 @@ Resources:
1607
1609
  "y": 69,
1608
1610
  "x": 19,
1609
1611
  "properties": {
1610
- "query": "SOURCE '/aws/lambda/${self:custom.funktor.DefaultQueueHandlerName}' | fields @initDuration\n| filter ispresent(@initDuration)\n| stats pct(@initDuration, 5) as p5,\n\n\n\n pct(@initDuration, 50) as p50,\n\n\n\n pct(@initDuration, 95) as p95,\n\n\n\n pct(@initDuration, 99) as p99\n\n\n\n by bin(20m)\n",
1612
+ "query": "SOURCE '/aws/lambda/${self:custom.funktor.DefaultQueueHandlerName}' | fields @initDuration\n| filter ispresent(@initDuration)\n| stats pct(@initDuration, 5) as p5,\n\n\n\n pct(@initDuration, 50) as p50,\n\n\n\n pct(@initDuration, 95) as p95,\n\n\n\n pct(@initDuration, 99) as p99\n\n\n\n by bin(1m)\n",
1611
1613
  "region": "us-east-1",
1612
1614
  "stacked": false,
1613
1615
  "view": "timeSeries",
@@ -1725,7 +1727,8 @@ Resources:
1725
1727
  [ "AWS/Lambda", "Errors", "FunctionName",
1726
1728
  "${self:custom.funktor.LowConcurrencyQueueHandlerName}", { "id": "errors", "stat": "Sum", "color": "#d13212" } ],
1727
1729
  [ ".", "Invocations", ".", ".", { "id": "invocations", "stat": "Sum", "visible": false } ],
1728
- [ { "expression": "100 - 100 * errors / MAX([errors, invocations])", "label": "Success rate (%)", "id": "availability", "yAxis": "right", "region": "us-east-1" } ]
1730
+ [ { "expression": "100 - 100 * errors / MAX([errors, invocations])", "label": "Success rate (%)", "id": "availability", "yAxis": "right", "region": "us-east-1" } ],
1731
+ [ "AWS/Lambda", "Throttles", "FunctionName", "${self:custom.funktor.LowConcurrencyQueueHandlerName}", { "id": "throttles", "color": "#ff7f0e" } ]
1729
1732
  ],
1730
1733
  "region": "us-east-1",
1731
1734
  "title": "LowConcurrency Queue Handler Error count and success rate (%)",
@@ -1787,7 +1790,7 @@ Resources:
1787
1790
  "y": 79,
1788
1791
  "x": 19,
1789
1792
  "properties": {
1790
- "query": "SOURCE '/aws/lambda/${self:custom.funktor.LowConcurrencyQueueHandlerName}' | fields @initDuration\n| filter ispresent(@initDuration)\n| stats pct(@initDuration, 5) as p5,\n\n\n\n pct(@initDuration, 50) as p50,\n\n\n\n pct(@initDuration, 95) as p95,\n\n\n\n pct(@initDuration, 99) as p99\n\n\n\n by bin(20m)\n",
1793
+ "query": "SOURCE '/aws/lambda/${self:custom.funktor.LowConcurrencyQueueHandlerName}' | fields @initDuration\n| filter ispresent(@initDuration)\n| stats pct(@initDuration, 5) as p5,\n\n\n\n pct(@initDuration, 50) as p50,\n\n\n\n pct(@initDuration, 95) as p95,\n\n\n\n pct(@initDuration, 99) as p99\n\n\n\n by bin(1m)\n",
1791
1794
  "region": "us-east-1",
1792
1795
  "stacked": false,
1793
1796
  "view": "timeSeries",
@@ -1877,7 +1880,8 @@ Resources:
1877
1880
  "metrics": [
1878
1881
  [ "AWS/Lambda", "Errors", "FunctionName", "${self:custom.funktor.JobActivatorName}", { "id": "errors", "stat": "Sum", "color": "#d13212" } ],
1879
1882
  [ ".", "Invocations", ".", ".", { "id": "invocations", "stat": "Sum", "visible": false } ],
1880
- [ { "expression": "100 - 100 * errors / MAX([errors, invocations])", "label": "Success rate (%)", "id": "availability", "yAxis": "right", "region": "us-east-1" } ]
1883
+ [ { "expression": "100 - 100 * errors / MAX([errors, invocations])", "label": "Success rate (%)", "id": "availability", "yAxis": "right", "region": "us-east-1" } ],
1884
+ [ "AWS/Lambda", "Throttles", "FunctionName", "${self:custom.funktor.JobActivatorName}", { "id": "throttles", "color": "#ff7f0e" } ]
1881
1885
  ],
1882
1886
  "region": "us-east-1",
1883
1887
  "title": "Job Activator Error count and success rate (%)",
@@ -1956,7 +1960,7 @@ Resources:
1956
1960
  "y": 89,
1957
1961
  "x": 19,
1958
1962
  "properties": {
1959
- "query": "SOURCE '/aws/lambda/${self:custom.funktor.JobActivatorName}' | fields @initDuration\n| filter ispresent(@initDuration)\n| stats pct(@initDuration, 5) as p5,\n\n\n\n pct(@initDuration, 50) as p50,\n\n\n\n pct(@initDuration, 95) as p95,\n\n\n\n pct(@initDuration, 99) as p99\n\n\n\n by bin(20m)\n",
1963
+ "query": "SOURCE '/aws/lambda/${self:custom.funktor.JobActivatorName}' | fields @initDuration\n| filter ispresent(@initDuration)\n| stats pct(@initDuration, 5) as p5,\n\n\n\n pct(@initDuration, 50) as p50,\n\n\n\n pct(@initDuration, 95) as p95,\n\n\n\n pct(@initDuration, 99) as p99\n\n\n\n by bin(1m)\n",
1960
1964
  "region": "us-east-1",
1961
1965
  "stacked": false,
1962
1966
  "view": "timeSeries",
@@ -52,9 +52,6 @@ custom:
52
52
  # commands. Or fallsback to what we have set in the provider section.
53
53
  stage: ${self:provider.stage, 'dev'}
54
54
  funktor: ${file(funktor_config/funktor.yml)}
55
- #rubyLayer: ${file(funktor_config/ruby_layer.yml)}
56
-
57
- #package: ${file(funktor_config/package.yml)}
58
55
 
59
56
  functions:
60
57
  IncomingJobHandler: ${file(funktor_config/function_definitions/incoming_job_handler.yml)}
@@ -72,4 +69,3 @@ resources:
72
69
  - ${file(funktor_config/resources/jobs_table.yml)}
73
70
 
74
71
  plugins:
75
- #- serverless-ruby-layer
@@ -33,27 +33,13 @@ module Funktor
33
33
  def funktor_config_yml
34
34
  #template "funktor_config.yml", File.join("funktor_config.yml")
35
35
  template File.join("funktor_config", "funktor.yml"), File.join("funktor_config", "funktor.yml")
36
- template File.join("funktor_config", "ruby_layer.yml"), File.join("funktor_config", "ruby_layer.yml")
37
- template File.join("funktor_config", "package.yml"), File.join("funktor_config", "package.yml")
38
36
  template File.join("funktor_config", "environment.yml"), File.join("funktor_config", "environment.yml")
39
37
  template File.join("funktor_config", "boot.rb"), File.join("funktor_config", "boot.rb")
40
38
  end
41
39
 
42
40
  def package_json
43
41
  if File.exist?("package.json")
44
- package_data = File.open("package.json").read
45
- if package_data =~ /serverless-ruby-layer/
46
- say "serverless-ruby-layer is already installed in package.json"
47
- else
48
- if File.exist?("package-lock.json")
49
- run "npm install serverless-ruby-layer@1.4.0 --save-dev"
50
- # TODO - Add handers for yarn and what not
51
- elsif File.exist?("yarn.lock")
52
- run "yarn add --dev serverless-ruby-layer@1.4.0"
53
- else
54
- say "You should install serverless-ruby-layer version 1.4.0 using yor package manager of choice."
55
- end
56
- end
42
+ say "package.json already exists"
57
43
  else
58
44
  template "package.json", File.join("package.json")
59
45
  end
@@ -8,7 +8,7 @@ FROM public.ecr.aws/lambda/ruby:2.7 AS build_image
8
8
  #ENV BUNDLE_GEM__FURY__IO=${BUNDLE_GEM__FURY__IO}
9
9
 
10
10
  # First we install some stuff that we need for gems that have to compile native extensions
11
- #RUN yum groupinstall "Development Tools" -y
11
+ RUN yum groupinstall "Development Tools" -y
12
12
  #RUN yum install -y amazon-linux-extras
13
13
  #RUN amazon-linux-extras enable postgresql11
14
14
  #RUN yum install -y postgresql-devel
@@ -57,6 +57,12 @@ FROM public.ecr.aws/lambda/ruby:2.7 AS deploy_image
57
57
  COPY --from=build_image /var/task .
58
58
  COPY . .
59
59
 
60
+ # Now we prime the bootsnap cache to minimize cold start times.
61
+
62
+ ENV BOOTSNAP_CACHE_DIR=/var/task/tmp/cache
63
+ RUN bundle exec bootsnap precompile --gemfile . \
64
+ && SKIP_ENV=true bundle exec ruby lambda_event_handlers/incoming_job_handler.rb
65
+
60
66
  # And finally we have the CMD for the deployed container
61
67
  # You can overwrite command in `serverless.yml` template
62
68
  CMD [ "app.LambdaFunction::Handler.process" ]
@@ -4,4 +4,4 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
4
4
  ruby '~> 2.7'
5
5
 
6
6
  gem 'funktor'
7
-
7
+ gem 'bootsnap', require: false
@@ -5,6 +5,9 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
5
5
  require "rubygems"
6
6
  require 'bundler/setup'
7
7
 
8
+ # load bootsnap for faster cold starts
9
+ require 'bootsnap/setup'
10
+
8
11
  # Set up gems listed in the Gemfile.
9
12
  Bundler.require(:default, :production)
10
13
 
@@ -449,7 +449,8 @@ Resources:
449
449
  "metrics": [
450
450
  [ "AWS/Lambda", "Errors", "FunctionName", "${self:custom.funktor.IncomingJobHandlerName}", { "id": "errors", "stat": "Sum", "color": "#d13212" } ],
451
451
  [ ".", "Invocations", ".", ".", { "id": "invocations", "stat": "Sum", "visible": false } ],
452
- [ { "expression": "100 - 100 * errors / MAX([errors, invocations])", "label": "Success rate (%)", "id": "availability", "yAxis": "right", "region": "us-east-1" } ]
452
+ [ { "expression": "100 - 100 * errors / MAX([errors, invocations])", "label": "Success rate (%)", "id": "availability", "yAxis": "right", "region": "us-east-1" } ],
453
+ [ "AWS/Lambda", "Throttles", "FunctionName", "${self:custom.funktor.IncomingJobHandlerName}", { "id": "throttles", "color": "#ff7f0e" } ]
453
454
  ],
454
455
  "region": "us-east-1",
455
456
  "title": "Incoming Job Handler Error count and success rate (%)",
@@ -510,7 +511,7 @@ Resources:
510
511
  "y": <%= current_y %>,
511
512
  "x": 19,
512
513
  "properties": {
513
- "query": "SOURCE '/aws/lambda/${self:custom.funktor.IncomingJobHandlerName}' | fields @initDuration\n| filter ispresent(@initDuration)\n| stats pct(@initDuration, 5) as p5,\n\n\n\n pct(@initDuration, 50) as p50,\n\n\n\n pct(@initDuration, 95) as p95,\n\n\n\n pct(@initDuration, 99) as p99\n\n\n\n by bin(20m)\n",
514
+ "query": "SOURCE '/aws/lambda/${self:custom.funktor.IncomingJobHandlerName}' | fields @initDuration\n| filter ispresent(@initDuration)\n| stats pct(@initDuration, 5) as p5,\n\n\n\n pct(@initDuration, 50) as p50,\n\n\n\n pct(@initDuration, 95) as p95,\n\n\n\n pct(@initDuration, 99) as p99\n\n\n\n by bin(1m)\n",
514
515
  "region": "us-east-1",
515
516
  "stacked": false,
516
517
  "view": "timeSeries",
@@ -632,7 +633,8 @@ Resources:
632
633
  [ "AWS/Lambda", "Errors", "FunctionName",
633
634
  "${self:custom.funktor.<%= queue_name.camelize %>QueueHandlerName}", { "id": "errors", "stat": "Sum", "color": "#d13212" } ],
634
635
  [ ".", "Invocations", ".", ".", { "id": "invocations", "stat": "Sum", "visible": false } ],
635
- [ { "expression": "100 - 100 * errors / MAX([errors, invocations])", "label": "Success rate (%)", "id": "availability", "yAxis": "right", "region": "us-east-1" } ]
636
+ [ { "expression": "100 - 100 * errors / MAX([errors, invocations])", "label": "Success rate (%)", "id": "availability", "yAxis": "right", "region": "us-east-1" } ],
637
+ [ "AWS/Lambda", "Throttles", "FunctionName", "${self:custom.funktor.<%= queue_name.camelize %>QueueHandlerName}", { "id": "throttles", "color": "#ff7f0e" } ]
636
638
  ],
637
639
  "region": "us-east-1",
638
640
  "title": "<%= queue_name.camelize %> Queue Handler Error count and success rate (%)",
@@ -694,7 +696,7 @@ Resources:
694
696
  "y": <%= current_y %>,
695
697
  "x": 19,
696
698
  "properties": {
697
- "query": "SOURCE '/aws/lambda/${self:custom.funktor.<%= queue_name.camelize %>QueueHandlerName}' | fields @initDuration\n| filter ispresent(@initDuration)\n| stats pct(@initDuration, 5) as p5,\n\n\n\n pct(@initDuration, 50) as p50,\n\n\n\n pct(@initDuration, 95) as p95,\n\n\n\n pct(@initDuration, 99) as p99\n\n\n\n by bin(20m)\n",
699
+ "query": "SOURCE '/aws/lambda/${self:custom.funktor.<%= queue_name.camelize %>QueueHandlerName}' | fields @initDuration\n| filter ispresent(@initDuration)\n| stats pct(@initDuration, 5) as p5,\n\n\n\n pct(@initDuration, 50) as p50,\n\n\n\n pct(@initDuration, 95) as p95,\n\n\n\n pct(@initDuration, 99) as p99\n\n\n\n by bin(1m)\n",
698
700
  "region": "us-east-1",
699
701
  "stacked": false,
700
702
  "view": "timeSeries",
@@ -785,7 +787,8 @@ Resources:
785
787
  "metrics": [
786
788
  [ "AWS/Lambda", "Errors", "FunctionName", "${self:custom.funktor.JobActivatorName}", { "id": "errors", "stat": "Sum", "color": "#d13212" } ],
787
789
  [ ".", "Invocations", ".", ".", { "id": "invocations", "stat": "Sum", "visible": false } ],
788
- [ { "expression": "100 - 100 * errors / MAX([errors, invocations])", "label": "Success rate (%)", "id": "availability", "yAxis": "right", "region": "us-east-1" } ]
790
+ [ { "expression": "100 - 100 * errors / MAX([errors, invocations])", "label": "Success rate (%)", "id": "availability", "yAxis": "right", "region": "us-east-1" } ],
791
+ [ "AWS/Lambda", "Throttles", "FunctionName", "${self:custom.funktor.JobActivatorName}", { "id": "throttles", "color": "#ff7f0e" } ]
789
792
  ],
790
793
  "region": "us-east-1",
791
794
  "title": "Job Activator Error count and success rate (%)",
@@ -864,7 +867,7 @@ Resources:
864
867
  "y": <%= current_y %>,
865
868
  "x": 19,
866
869
  "properties": {
867
- "query": "SOURCE '/aws/lambda/${self:custom.funktor.JobActivatorName}' | fields @initDuration\n| filter ispresent(@initDuration)\n| stats pct(@initDuration, 5) as p5,\n\n\n\n pct(@initDuration, 50) as p50,\n\n\n\n pct(@initDuration, 95) as p95,\n\n\n\n pct(@initDuration, 99) as p99\n\n\n\n by bin(20m)\n",
870
+ "query": "SOURCE '/aws/lambda/${self:custom.funktor.JobActivatorName}' | fields @initDuration\n| filter ispresent(@initDuration)\n| stats pct(@initDuration, 5) as p5,\n\n\n\n pct(@initDuration, 50) as p50,\n\n\n\n pct(@initDuration, 95) as p95,\n\n\n\n pct(@initDuration, 99) as p99\n\n\n\n by bin(1m)\n",
868
871
  "region": "us-east-1",
869
872
  "stacked": false,
870
873
  "view": "timeSeries",
@@ -38,12 +38,12 @@ handlerDefaults:
38
38
  # Visibility timeout should only come into play in the case of Funktor errors.
39
39
  # Application level errors should be handled by Funktor retry mechanisms.
40
40
  # The visibility timeout should be at least as long as the function timeout, and up to 6 times larger.
41
- visibilityTimeout: 1800
41
+ visibilityTimeout: 300
42
42
 
43
43
  # Max recieve count affects how many times a job will retry that has been throttled at the SQS -> Lambda boundary.
44
44
  # Amazon recommend this be at least 5, but I've found that higher numbers are better to avoid legit jobs ending
45
45
  # up in the dead letter queue
46
- maxReceiveCount: 20
46
+ maxReceiveCount: 120
47
47
 
48
48
  # Incoming Job Handler
49
49
  incomingJobHandler:
@@ -3,6 +3,5 @@
3
3
  "description": "",
4
4
  "version": "0.1.0",
5
5
  "devDependencies": {
6
- "serverless-ruby-layer": "^1.4.0"
7
6
  }
8
7
  }
@@ -49,9 +49,6 @@ custom:
49
49
  # commands. Or fallsback to what we have set in the provider section.
50
50
  stage: ${self:provider.stage, 'dev'}
51
51
  funktor: ${file(funktor_config/funktor.yml)}
52
- #rubyLayer: ${file(funktor_config/ruby_layer.yml)}
53
-
54
- #package: ${file(funktor_config/package.yml)}
55
52
 
56
53
  functions:
57
54
  <%- all_function_definitions.each do |function_definition| -%>
@@ -64,4 +61,3 @@ resources:
64
61
  <%- end -%>
65
62
 
66
63
  plugins:
67
- #- serverless-ruby-layer
@@ -1,3 +1,3 @@
1
1
  module Funktor
2
- VERSION = "0.7.22"
2
+ VERSION = "0.7.25"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: funktor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.22
4
+ version: 0.7.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Green
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-03 00:00:00.000000000 Z
11
+ date: 2022-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-sqs
@@ -199,14 +199,12 @@ files:
199
199
  - funktor-testapp/funktor_config/iam_permissions/jobs_table_secondary_index.yml
200
200
  - funktor-testapp/funktor_config/iam_permissions/low_concurrency_queue.yml
201
201
  - funktor-testapp/funktor_config/iam_permissions/ssm.yml
202
- - funktor-testapp/funktor_config/package.yml
203
202
  - funktor-testapp/funktor_config/resources/cloudwatch_dashboard.yml
204
203
  - funktor-testapp/funktor_config/resources/default_queue.yml
205
204
  - funktor-testapp/funktor_config/resources/incoming_job_queue.yml
206
205
  - funktor-testapp/funktor_config/resources/incoming_job_queue_user.yml
207
206
  - funktor-testapp/funktor_config/resources/jobs_table.yml
208
207
  - funktor-testapp/funktor_config/resources/low_concurrency_queue.yml
209
- - funktor-testapp/funktor_config/ruby_layer.yml
210
208
  - funktor-testapp/funktor_init.yml
211
209
  - funktor-testapp/lambda_event_handlers/default_queue_handler.rb
212
210
  - funktor-testapp/lambda_event_handlers/incoming_job_handler.rb
@@ -242,13 +240,11 @@ files:
242
240
  - lib/funktor/cli/templates/funktor_config/iam_permissions/jobs_table_secondary_index.yml
243
241
  - lib/funktor/cli/templates/funktor_config/iam_permissions/ssm.yml
244
242
  - lib/funktor/cli/templates/funktor_config/iam_permissions/work_queue.yml
245
- - lib/funktor/cli/templates/funktor_config/package.yml
246
243
  - lib/funktor/cli/templates/funktor_config/resources/cloudwatch_dashboard.yml
247
244
  - lib/funktor/cli/templates/funktor_config/resources/incoming_job_queue.yml
248
245
  - lib/funktor/cli/templates/funktor_config/resources/incoming_job_queue_user.yml
249
246
  - lib/funktor/cli/templates/funktor_config/resources/jobs_table.yml
250
247
  - lib/funktor/cli/templates/funktor_config/resources/work_queue.yml
251
- - lib/funktor/cli/templates/funktor_config/ruby_layer.yml
252
248
  - lib/funktor/cli/templates/funktor_init.yml.tt
253
249
  - lib/funktor/cli/templates/gitignore
254
250
  - lib/funktor/cli/templates/lambda_event_handlers/incoming_job_handler.rb
@@ -1,11 +0,0 @@
1
- # TODO - Figure out how to allow individual packaging to work out of the box.
2
- #individually: false
3
- #include:
4
- #- Gemfile
5
- #- Gemfile.lock
6
- #- funktor_config/boot.rb
7
- #- app/**
8
- # Evertyting is excluded by default with serverless-ruby-layer, but you could use
9
- # the lines below to exlude files that are inside an include path.
10
- #exclude:
11
- # - workers/excluded_worker.rb
@@ -1,11 +0,0 @@
1
- #use_docker: false
2
- #docker_yums:
3
- #- postgresql-devel
4
- #native_libs:
5
- #- /usr/lib64/libpq.so.5
6
- #- /usr/lib64/libldap_r-2.4.so.2
7
- #- /usr/lib64/liblber-2.4.so.2
8
- #- /usr/lib64/libsasl2.so.3
9
- #- /usr/lib64/libssl3.so
10
- #- /usr/lib64/libsmime3.so
11
- #- /usr/lib64/libnss3.so
@@ -1,11 +0,0 @@
1
- # TODO - Figure out how to allow individual packaging to work out of the box.
2
- #individually: false
3
- #include:
4
- #- Gemfile
5
- #- Gemfile.lock
6
- #- funktor_config/boot.rb
7
- #- app/**
8
- # Evertyting is excluded by default with serverless-ruby-layer, but you could use
9
- # the lines below to exlude files that are inside an include path.
10
- #exclude:
11
- # - workers/excluded_worker.rb
@@ -1,11 +0,0 @@
1
- #use_docker: false
2
- #docker_yums:
3
- #- postgresql-devel
4
- #native_libs:
5
- #- /usr/lib64/libpq.so.5
6
- #- /usr/lib64/libldap_r-2.4.so.2
7
- #- /usr/lib64/liblber-2.4.so.2
8
- #- /usr/lib64/libsasl2.so.3
9
- #- /usr/lib64/libssl3.so
10
- #- /usr/lib64/libsmime3.so
11
- #- /usr/lib64/libnss3.so