funktor 0.2.11 → 0.2.16

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: 99102148cae3682c1c870882cd44b9651869e3d1ec3adb7e3b4145ef7a6becf5
4
- data.tar.gz: c6adb462dbe095673a72e81570d293a59a7f75d18376178684cabe5c81342f3c
3
+ metadata.gz: fa01638d668cf37cb97173784714a5339a13d37b4dbbc1c55edf5d4633f034de
4
+ data.tar.gz: a245b13673f1eabd8721468638205e9da36f75a6892389cc8156ecee4d6d1bf3
5
5
  SHA512:
6
- metadata.gz: 501e7dd2f92ff36d492da512861bf4dd6ab56f07a4fcbc6c362fa5249a52f0e2694b835d6eda1b454304046be2315c8a9a253c92a25e8548605a7dc4829008ac
7
- data.tar.gz: fa98731784d2b0007b9bf831b2536f9ec93bbb5a8870e7f5b9e8810b414002d1f760000d18fa581b7e6f8016f48e9dbca1d905bf1d2821dbfaf85cdec80158dc
6
+ metadata.gz: 5f4ea8b57070bb603e33edb9dbad4a088b1c7deb3b8e5e34c1c2667a063c421a4cf843eae7a495a9762a00fd2bbce8316c7c38f287ad0e7c7e02003941fd5885
7
+ data.tar.gz: f550064ade4cb5dabf889f4cccdff22b065806e79043086aa86b95592dd7f665da7de2afe63402a15470f491002f90153cb70d8bacd17fe9f7b260cced77170f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- funktor (0.2.11)
4
+ funktor (0.2.16)
5
5
  activesupport
6
6
  aws-sdk-sqs (~> 1.37)
7
7
  thor
@@ -18,13 +18,13 @@ GEM
18
18
  addressable (2.7.0)
19
19
  public_suffix (>= 2.0.2, < 5.0)
20
20
  aws-eventstream (1.1.1)
21
- aws-partitions (1.472.0)
21
+ aws-partitions (1.473.0)
22
22
  aws-sdk-core (3.115.0)
23
23
  aws-eventstream (~> 1, >= 1.0.2)
24
24
  aws-partitions (~> 1, >= 1.239.0)
25
25
  aws-sigv4 (~> 1.1)
26
26
  jmespath (~> 1.0)
27
- aws-sdk-sqs (1.39.0)
27
+ aws-sdk-sqs (1.40.0)
28
28
  aws-sdk-core (~> 3, >= 3.112.0)
29
29
  aws-sigv4 (~> 1.1)
30
30
  aws-sigv4 (1.2.3)
@@ -50,8 +50,7 @@ module Funktor
50
50
  puts job.to_json
51
51
  sqs_client.send_message({
52
52
  queue_url: job.retry_queue_url,
53
- message_body: job.to_json,
54
- delay_seconds: job.delay
53
+ message_body: job.to_json
55
54
  })
56
55
  end
57
56
 
@@ -321,6 +321,29 @@ Resources:
321
321
  "title": "Job Duration by Worker"
322
322
  }
323
323
  },
324
+
325
+ <% current_y += 6 %>
326
+ { <% "Processed/Failed Jobs By Worker" %>
327
+ "height": 6,
328
+ "width": 24,
329
+ "y": <%= current_y %>,
330
+ "x": 0,
331
+ "type": "metric",
332
+ "properties": {
333
+ "metrics": [
334
+ <%- app_worker_names.each do |worker_name| -%>
335
+ [ "<%= app_name %>", "processed", "WorkerClassName", "<%= worker_name %>" ],
336
+ [ ".", "failed", ".", "." ]<%= worker_name == app_worker_names.last ? "" : "," %>
337
+ <%- end -%>
338
+ ],
339
+ "view": "timeSeries",
340
+ "stacked": false,
341
+ "region": "us-east-1",
342
+ "title": "Process/Failed Jobs By Worker",
343
+ "period": 60,
344
+ "stat": "Sum"
345
+ }
346
+ },
324
347
  <% current_y += 6 %>
325
348
 
326
349
  { <% "Delayed Jobs" %>
@@ -551,5 +574,8 @@ Resources:
551
574
  }
552
575
  }
553
576
 
577
+
578
+
579
+
554
580
  ]
555
581
  }
@@ -21,7 +21,7 @@ module Funktor
21
21
  "CloudWatchMetrics": [
22
22
  {
23
23
  "Namespace": ENV['FUNKTOR_APP_NAME'],
24
- "Dimensions": [["WorkerClassName"]],
24
+ "Dimensions": [["WorkerClassName"], ["Queue"]],
25
25
  "Metrics": [ # CPU, Memory, Duration, etc...
26
26
  {
27
27
  "Name": dimension,
@@ -32,6 +32,7 @@ module Funktor
32
32
  ]
33
33
  },
34
34
  "WorkerClassName": job.worker_class_name,
35
+ "Queue": job.queue,
35
36
  "#{dimension}": 1
36
37
  #"count": value,
37
38
  #"requestId": "989ffbf8-9ace-4817-a57c-e4dd734019ee"
data/lib/funktor/job.rb CHANGED
@@ -35,7 +35,11 @@ module Funktor
35
35
  end
36
36
 
37
37
  def delay
38
- job_data["delay"]
38
+ # TODO - In Funktor Pro we need to override this method (or do something else) so that
39
+ # we can schedule jobs farther in the future than 15 minutes. We do this here in case a
40
+ # retry sequence goes too long.
41
+ jdelay = job_data["delay"]
42
+ return jdelay < 900 ? jdelay : 900
39
43
  end
40
44
 
41
45
  def delay=(delay)
@@ -20,7 +20,7 @@ module Funktor
20
20
  "CloudWatchMetrics": [
21
21
  {
22
22
  "Namespace": ENV['FUNKTOR_APP_NAME'],
23
- "Dimensions": [["WorkerClassName"]],
23
+ "Dimensions": [["WorkerClassName"], ["Queue"]],
24
24
  "Metrics": [ # CPU, Memory, Duration, etc...
25
25
  {
26
26
  "Name": "Duration",
@@ -31,6 +31,7 @@ module Funktor
31
31
  ]
32
32
  },
33
33
  "WorkerClassName": job.worker_class_name,
34
+ "Queue": job.queue,
34
35
  "Duration": time_diff_in_seconds * 1_000
35
36
  #"count": value,
36
37
  #"requestId": "989ffbf8-9ace-4817-a57c-e4dd734019ee"
@@ -1,3 +1,3 @@
1
1
  module Funktor
2
- VERSION = "0.2.11"
2
+ VERSION = "0.2.16"
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.2.11
4
+ version: 0.2.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Green
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-30 00:00:00.000000000 Z
11
+ date: 2021-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-sqs