tomo-plugin-sidekiq 0.3.0 → 1.0.0
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/README.md +4 -1
- data/lib/tomo/plugin/sidekiq.rb +8 -12
- data/lib/tomo/plugin/sidekiq/tasks.rb +0 -2
- data/lib/tomo/plugin/sidekiq/version.rb +4 -3
- metadata +23 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cc455cd944fe885a793528659aeebfc14a3017963d5d65ceaf7ccb0c20b6691b
|
|
4
|
+
data.tar.gz: d3159ca50b276b4661284d4ee16c63350f63d2533bad431880331d853303c025
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9e74f099e8e92ba407fab345b410e903f2bad27adf530047b34cb61cfbcbb198be335dbd862a0b9795cde4f9f6bb41be8e8a881c0e6ff09cbb066d4fce27143
|
|
7
|
+
data.tar.gz: 1519af99a618ce43d08ce86cf93d7a08d1c4996009e397371289ac40533932e1185c66e00468012c0580e2fc97dcc349701e1318398dce94ccc66021cccacee5
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://rubygems.org/gems/tomo-plugin-sidekiq)
|
|
4
4
|
[](https://travis-ci.org/mattbrictson/tomo-plugin-sidekiq)
|
|
5
|
-
[](https://circleci.com/
|
|
5
|
+
[](https://app.circleci.com/pipelines/github/mattbrictson/tomo-plugin-sidekiq?branch=master)
|
|
6
6
|
[](https://codeclimate.com/github/mattbrictson/tomo-plugin-sidekiq)
|
|
7
7
|
|
|
8
8
|
This is a [tomo](https://github.com/mattbrictson/tomo) plugin that provides tasks for managing [sidekiq](https://github.com/mperham/sidekiq) via [systemd](https://en.wikipedia.org/wiki/Systemd), based on the recommendations in the sidekiq documentation. This plugin assumes that you are also using the tomo `rbenv` and `env` plugins, and that you are using a systemd-based Linux distribution like Ubuntu 18 LTS.
|
|
@@ -12,6 +12,7 @@ This is a [tomo](https://github.com/mattbrictson/tomo) plugin that provides task
|
|
|
12
12
|
- [Installation](#installation)
|
|
13
13
|
- [Settings](#settings)
|
|
14
14
|
- [Tasks](#tasks)
|
|
15
|
+
- [Recommendations](#recommendations)
|
|
15
16
|
- [Support](#support)
|
|
16
17
|
- [License](#license)
|
|
17
18
|
- [Code of conduct](#code-of-conduct)
|
|
@@ -135,6 +136,8 @@ Add a `config/sidekiq.yml` file to your application (i.e. checked into git) and
|
|
|
135
136
|
:queues:
|
|
136
137
|
- default
|
|
137
138
|
- mailers
|
|
139
|
+
- active_storage_analysis
|
|
140
|
+
- active_storage_purge
|
|
138
141
|
|
|
139
142
|
:concurrency: <%= ENV.fetch("SIDEKIQ_CONCURRENCY", "1") %>
|
|
140
143
|
```
|
data/lib/tomo/plugin/sidekiq.rb
CHANGED
|
@@ -2,18 +2,14 @@ require "tomo"
|
|
|
2
2
|
require_relative "sidekiq/tasks"
|
|
3
3
|
require_relative "sidekiq/version"
|
|
4
4
|
|
|
5
|
-
module Tomo
|
|
6
|
-
|
|
7
|
-
module Sidekiq
|
|
8
|
-
extend Tomo::PluginDSL
|
|
5
|
+
module Tomo::Plugin::Sidekiq
|
|
6
|
+
extend Tomo::PluginDSL
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
tasks Tomo::Plugin::Sidekiq::Tasks
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
end
|
|
18
|
-
end
|
|
10
|
+
# rubocop:disable Layout/LineLength
|
|
11
|
+
defaults sidekiq_systemd_service: "sidekiq_%{application}.service",
|
|
12
|
+
sidekiq_systemd_service_path: ".config/systemd/user/%{sidekiq_systemd_service}",
|
|
13
|
+
sidekiq_systemd_service_template_path: File.expand_path("sidekiq/service.erb", __dir__)
|
|
14
|
+
# rubocop:enable Layout/LineLength
|
|
19
15
|
end
|
|
@@ -2,7 +2,6 @@ module Tomo::Plugin::Sidekiq
|
|
|
2
2
|
class Tasks < Tomo::TaskLibrary
|
|
3
3
|
SystemdUnit = Struct.new(:name, :template, :path)
|
|
4
4
|
|
|
5
|
-
# rubocop:disable Metrics/AbcSize
|
|
6
5
|
def setup_systemd
|
|
7
6
|
linger_must_be_enabled!
|
|
8
7
|
|
|
@@ -12,7 +11,6 @@ module Tomo::Plugin::Sidekiq
|
|
|
12
11
|
remote.run "systemctl --user daemon-reload"
|
|
13
12
|
remote.run "systemctl", "--user", "enable", service.name
|
|
14
13
|
end
|
|
15
|
-
# rubocop:enable Metrics/AbcSize
|
|
16
14
|
|
|
17
15
|
%i[reload restart start stop status].each do |action|
|
|
18
16
|
define_method(action) do
|
metadata
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tomo-plugin-sidekiq
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt Brictson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-04-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: tomo
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "
|
|
17
|
+
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: '1.0'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- - "
|
|
24
|
+
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: '1.0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: bundler
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -100,14 +100,28 @@ dependencies:
|
|
|
100
100
|
requirements:
|
|
101
101
|
- - '='
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: 0.
|
|
103
|
+
version: 0.81.0
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - '='
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: 0.81.0
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: rubocop-minitest
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - '='
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: 0.8.1
|
|
104
118
|
type: :development
|
|
105
119
|
prerelease: false
|
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
121
|
requirements:
|
|
108
122
|
- - '='
|
|
109
123
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: 0.
|
|
124
|
+
version: 0.8.1
|
|
111
125
|
- !ruby/object:Gem::Dependency
|
|
112
126
|
name: rubocop-performance
|
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -151,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
151
165
|
requirements:
|
|
152
166
|
- - ">="
|
|
153
167
|
- !ruby/object:Gem::Version
|
|
154
|
-
version: 2.
|
|
168
|
+
version: 2.5.0
|
|
155
169
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
170
|
requirements:
|
|
157
171
|
- - ">="
|