sidekiq 7.3.9 → 8.0.0.beta2
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/Changes.md +28 -0
- data/README.md +16 -13
- data/bin/sidekiqload +10 -10
- data/bin/webload +69 -0
- data/lib/active_job/queue_adapters/sidekiq_adapter.rb +5 -5
- data/lib/sidekiq/api.rb +120 -36
- data/lib/sidekiq/capsule.rb +6 -6
- data/lib/sidekiq/cli.rb +15 -19
- data/lib/sidekiq/client.rb +13 -16
- data/lib/sidekiq/component.rb +40 -2
- data/lib/sidekiq/config.rb +18 -15
- data/lib/sidekiq/embedded.rb +1 -0
- data/lib/sidekiq/iterable_job.rb +1 -0
- data/lib/sidekiq/job/iterable.rb +13 -4
- data/lib/sidekiq/job_retry.rb +17 -5
- data/lib/sidekiq/job_util.rb +5 -1
- data/lib/sidekiq/launcher.rb +1 -1
- data/lib/sidekiq/logger.rb +6 -10
- data/lib/sidekiq/manager.rb +0 -1
- data/lib/sidekiq/metrics/query.rb +71 -45
- data/lib/sidekiq/metrics/shared.rb +4 -1
- data/lib/sidekiq/metrics/tracking.rb +9 -7
- data/lib/sidekiq/middleware/current_attributes.rb +5 -17
- data/lib/sidekiq/paginator.rb +8 -1
- data/lib/sidekiq/processor.rb +21 -14
- data/lib/sidekiq/profiler.rb +59 -0
- data/lib/sidekiq/redis_client_adapter.rb +0 -1
- data/lib/sidekiq/testing.rb +2 -2
- data/lib/sidekiq/version.rb +2 -2
- data/lib/sidekiq/web/action.rb +104 -84
- data/lib/sidekiq/web/application.rb +347 -332
- data/lib/sidekiq/web/config.rb +116 -0
- data/lib/sidekiq/web/helpers.rb +41 -16
- data/lib/sidekiq/web/router.rb +60 -76
- data/lib/sidekiq/web.rb +51 -156
- data/lib/sidekiq.rb +1 -1
- data/sidekiq.gemspec +5 -4
- data/web/assets/javascripts/application.js +6 -13
- data/web/assets/javascripts/base-charts.js +30 -16
- data/web/assets/javascripts/chartjs-adapter-date-fns.min.js +7 -0
- data/web/assets/javascripts/metrics.js +16 -34
- data/web/assets/stylesheets/style.css +750 -0
- data/web/locales/ar.yml +1 -0
- data/web/locales/cs.yml +1 -0
- data/web/locales/da.yml +1 -0
- data/web/locales/de.yml +1 -0
- data/web/locales/el.yml +1 -0
- data/web/locales/en.yml +6 -0
- data/web/locales/es.yml +24 -2
- data/web/locales/fa.yml +1 -0
- data/web/locales/fr.yml +1 -0
- data/web/locales/gd.yml +1 -0
- data/web/locales/he.yml +1 -0
- data/web/locales/hi.yml +1 -0
- data/web/locales/it.yml +1 -0
- data/web/locales/ja.yml +1 -0
- data/web/locales/ko.yml +1 -0
- data/web/locales/lt.yml +1 -0
- data/web/locales/nb.yml +1 -0
- data/web/locales/nl.yml +1 -0
- data/web/locales/pl.yml +1 -0
- data/web/locales/{pt-br.yml → pt-BR.yml} +2 -1
- data/web/locales/pt.yml +1 -0
- data/web/locales/ru.yml +1 -0
- data/web/locales/sv.yml +1 -0
- data/web/locales/ta.yml +1 -0
- data/web/locales/tr.yml +1 -0
- data/web/locales/uk.yml +1 -0
- data/web/locales/ur.yml +1 -0
- data/web/locales/vi.yml +1 -0
- data/web/locales/{zh-cn.yml → zh-CN.yml} +85 -73
- data/web/locales/{zh-tw.yml → zh-TW.yml} +2 -1
- data/web/views/_footer.erb +31 -33
- data/web/views/_job_info.erb +91 -89
- data/web/views/_metrics_period_select.erb +13 -10
- data/web/views/_nav.erb +14 -21
- data/web/views/_paging.erb +23 -21
- data/web/views/_poll_link.erb +2 -2
- data/web/views/_summary.erb +16 -16
- data/web/views/busy.erb +124 -122
- data/web/views/dashboard.erb +62 -66
- data/web/views/dead.erb +31 -27
- data/web/views/filtering.erb +3 -3
- data/web/views/layout.erb +6 -22
- data/web/views/metrics.erb +75 -81
- data/web/views/metrics_for_job.erb +45 -46
- data/web/views/morgue.erb +61 -70
- data/web/views/profiles.erb +43 -0
- data/web/views/queue.erb +54 -52
- data/web/views/queues.erb +43 -41
- data/web/views/retries.erb +66 -75
- data/web/views/retry.erb +32 -27
- data/web/views/scheduled.erb +58 -54
- data/web/views/scheduled_job_info.erb +1 -1
- metadata +32 -18
- data/web/assets/stylesheets/application-dark.css +0 -147
- data/web/assets/stylesheets/application-rtl.css +0 -163
- data/web/assets/stylesheets/application.css +0 -759
- data/web/assets/stylesheets/bootstrap-rtl.min.css +0 -9
- data/web/assets/stylesheets/bootstrap.css +0 -5
- data/web/views/_status.erb +0 -4
@@ -4,14 +4,6 @@ class JobMetricsOverviewChart extends BaseChart {
|
|
4
4
|
this.swatches = [];
|
5
5
|
this.visibleKls = options.visibleKls;
|
6
6
|
|
7
|
-
const countBuckets = this.options.labels.length / 60;
|
8
|
-
this.labelBuckets = this.options.labels.reduce((acc, label, index) => {
|
9
|
-
const bucket = Math.floor(index / countBuckets);
|
10
|
-
acc[bucket] = acc[bucket] || [];
|
11
|
-
acc[bucket].push(label);
|
12
|
-
return acc;
|
13
|
-
}, []);
|
14
|
-
|
15
7
|
this.init();
|
16
8
|
}
|
17
9
|
|
@@ -39,7 +31,7 @@ class JobMetricsOverviewChart extends BaseChart {
|
|
39
31
|
updateSwatch(kls, checked) {
|
40
32
|
const el = this.swatches[kls];
|
41
33
|
el.checked = checked;
|
42
|
-
el.style.
|
34
|
+
el.style.accentColor = this.colors.assignments[kls] || "";
|
43
35
|
}
|
44
36
|
|
45
37
|
toggleKls(kls, visible) {
|
@@ -60,7 +52,7 @@ class JobMetricsOverviewChart extends BaseChart {
|
|
60
52
|
|
61
53
|
return {
|
62
54
|
label: kls,
|
63
|
-
data: this.
|
55
|
+
data: this.dataFromSeries(this.options.series[kls]),
|
64
56
|
borderColor: color,
|
65
57
|
backgroundColor: color,
|
66
58
|
borderWidth: 2,
|
@@ -68,24 +60,9 @@ class JobMetricsOverviewChart extends BaseChart {
|
|
68
60
|
};
|
69
61
|
}
|
70
62
|
|
71
|
-
|
72
|
-
// `
|
73
|
-
|
74
|
-
return this.labelBuckets.reduce((acc, labels) => {
|
75
|
-
const bucketValues = labels.map(label => series[label]).filter(v => v);
|
76
|
-
if (bucketValues.length > 0) {
|
77
|
-
// Sum up the values for each bucket that has data.
|
78
|
-
// The new label is the bucket's first label, its start time.
|
79
|
-
acc[labels[0]] = bucketValues.reduce((a, b) => a + b, 0);
|
80
|
-
}
|
81
|
-
return acc;
|
82
|
-
}, {});
|
83
|
-
}
|
84
|
-
|
85
|
-
buildTooltipTitle(items) {
|
86
|
-
const [first, ...rest] = this.labelBuckets.find((labels) => labels[0] === items[0].label);
|
87
|
-
const title = [first, rest[rest.length - 1]].filter(v => v).join(" - ");
|
88
|
-
return `${title} UTC`
|
63
|
+
dataFromSeries(series) {
|
64
|
+
// Chart.js expects `data` to be an array of objects with `x` and `y` values.
|
65
|
+
return Object.entries(series).map(([isoTime, val]) => ({ x: isoTime, y: val }));
|
89
66
|
}
|
90
67
|
|
91
68
|
get chartOptions() {
|
@@ -94,6 +71,12 @@ class JobMetricsOverviewChart extends BaseChart {
|
|
94
71
|
aspectRatio: 4,
|
95
72
|
scales: {
|
96
73
|
...super.chartOptions.scales,
|
74
|
+
x: {
|
75
|
+
...super.chartOptions.scales.x,
|
76
|
+
type: "time",
|
77
|
+
min: this.options.starts_at,
|
78
|
+
max: this.options.ends_at,
|
79
|
+
},
|
97
80
|
y: {
|
98
81
|
...super.chartOptions.scales.y,
|
99
82
|
beginAtZero: true,
|
@@ -108,12 +91,11 @@ class JobMetricsOverviewChart extends BaseChart {
|
|
108
91
|
tooltip: {
|
109
92
|
...super.chartOptions.plugins.tooltip,
|
110
93
|
callbacks: {
|
111
|
-
title: (items) => this.buildTooltipTitle(items),
|
112
94
|
label: (item) =>
|
113
95
|
`${item.dataset.label}: ${item.parsed.y.toFixed(1)} ` +
|
114
96
|
`${this.options.units}`,
|
115
97
|
footer: (items) => {
|
116
|
-
const bucket = items[0].
|
98
|
+
const bucket = items[0].raw.x;
|
117
99
|
const marks = this.options.marks.filter(([b, _]) => b == bucket);
|
118
100
|
return marks.map(
|
119
101
|
([b, msg]) => `${this.options.markLabel}: ${msg}`
|
@@ -206,7 +188,7 @@ class HistBubbleChart extends BaseChart {
|
|
206
188
|
});
|
207
189
|
|
208
190
|
// Chart.js will not calculate the bubble size. We have to do that.
|
209
|
-
const maxRadius = this.el.offsetWidth /
|
191
|
+
const maxRadius = this.el.offsetWidth / 100;
|
210
192
|
const minRadius = 1;
|
211
193
|
const multiplier = (maxRadius / maxCount) * 1.5;
|
212
194
|
data.forEach((entry) => {
|
@@ -230,8 +212,9 @@ class HistBubbleChart extends BaseChart {
|
|
230
212
|
...super.chartOptions.scales,
|
231
213
|
x: {
|
232
214
|
...super.chartOptions.scales.x,
|
233
|
-
type: "
|
234
|
-
|
215
|
+
type: "time",
|
216
|
+
min: this.options.starts_at,
|
217
|
+
max: this.options.ends_at,
|
235
218
|
},
|
236
219
|
y: {
|
237
220
|
...super.chartOptions.scales.y,
|
@@ -246,7 +229,6 @@ class HistBubbleChart extends BaseChart {
|
|
246
229
|
tooltip: {
|
247
230
|
...super.chartOptions.plugins.tooltip,
|
248
231
|
callbacks: {
|
249
|
-
title: (items) => `${items[0].raw.x} UTC`,
|
250
232
|
label: (item) =>
|
251
233
|
`${item.parsed.y} ${this.options.yUnits}: ${item.raw.count} ${this.options.zUnits}`,
|
252
234
|
footer: (items) => {
|