funktor 0.2.11 → 0.2.16
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/funktor/active_job_handler.rb +1 -2
- data/lib/funktor/cli/templates/config/resources/cloudwatch_dashboard.yml +26 -0
- data/lib/funktor/counter.rb +2 -1
- data/lib/funktor/job.rb +5 -1
- data/lib/funktor/middleware/metrics.rb +2 -1
- data/lib/funktor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa01638d668cf37cb97173784714a5339a13d37b4dbbc1c55edf5d4633f034de
|
4
|
+
data.tar.gz: a245b13673f1eabd8721468638205e9da36f75a6892389cc8156ecee4d6d1bf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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.
|
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)
|
@@ -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
|
}
|
data/lib/funktor/counter.rb
CHANGED
@@ -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
|
-
|
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"
|
data/lib/funktor/version.rb
CHANGED
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.
|
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-
|
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
|