tomo-plugin-sidekiq 0.3.0 → 1.0.4

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: 47c78ea155f415b848273527a82d1fa671c90532ef67e99e945121534e5224d7
4
- data.tar.gz: '0784efa31186c438881bbd1576b4167aa2a7d3fa9441afeb0857903df2042017'
3
+ metadata.gz: e237323ed1083b14a2491a5105d3b4d802896b3008d3da4d06ca3fed1a1c7f0f
4
+ data.tar.gz: 66dde1726e0f6ac03fd84a28b1d4cf93ba16d41a5aff1c15a65960f84726370e
5
5
  SHA512:
6
- metadata.gz: 2bca9dca6faeca252354fb70e7b4b0cf8bf464bba27caf40af246923958de3b1415701accdcb6691b589026eb5eb9042cad4e83f0a7f78f782fd16e0c5701012
7
- data.tar.gz: 80be68025a9714a6f146e1f4e25113af665624766ac0ce644b90ea0e9e923ef2a426246176b5c6a5c339cf3a61d2ddd8aa1beb28f092b9c699c9d102dd28018f
6
+ metadata.gz: d287e6badc250b09c864031f10aaf2712667c96e10512faee3c7abd013b422e1763d2cab071353cae6487ca64614f07e360936dcc843d16c938b353f2f05939c
7
+ data.tar.gz: 7700fe05bd75c62e34aadbf1000a326694c8b501719ee5a0b0fbf396af1cbf563100586735b0a892693927ccb24b937cdf1a7ec03cfdc780ccb0c923b1d02975
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020 Matt Brictson
3
+ Copyright (c) 2021 Matt Brictson
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # tomo-plugin-sidekiq
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/tomo-plugin-sidekiq.svg)](https://rubygems.org/gems/tomo-plugin-sidekiq)
4
- [![Travis](https://img.shields.io/travis/mattbrictson/tomo-plugin-sidekiq.svg?label=travis)](https://travis-ci.org/mattbrictson/tomo-plugin-sidekiq)
5
- [![Circle](https://circleci.com/gh/mattbrictson/tomo-plugin-sidekiq.svg?style=shield)](https://circleci.com/gh/mattbrictson/tomo-plugin-sidekiq)
4
+ [![Circle](https://circleci.com/gh/mattbrictson/tomo-plugin-sidekiq/tree/main.svg?style=shield)](https://app.circleci.com/pipelines/github/mattbrictson/tomo-plugin-sidekiq?branch=main)
6
5
  [![Code Climate](https://codeclimate.com/github/mattbrictson/tomo-plugin-sidekiq/badges/gpa.svg)](https://codeclimate.com/github/mattbrictson/tomo-plugin-sidekiq)
7
6
 
8
7
  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 +11,7 @@ This is a [tomo](https://github.com/mattbrictson/tomo) plugin that provides task
12
11
  - [Installation](#installation)
13
12
  - [Settings](#settings)
14
13
  - [Tasks](#tasks)
14
+ - [Recommendations](#recommendations)
15
15
  - [Support](#support)
16
16
  - [License](#license)
17
17
  - [Code of conduct](#code-of-conduct)
@@ -63,7 +63,7 @@ $ loginctl enable-linger <DEPLOY_USER>
63
63
  | --------------------- | ------- |
64
64
  | `sidekiq_systemd_service` | Name of the systemd unit that will be used to manage sidekiq <br>**Default:** `"sidekiq_%{application}.service"` |
65
65
  | `sidekiq_systemd_service_path` | Location where the systemd unit will be installed <br>**Default:** `".config/systemd/user/%{sidekiq_systemd_service}"` |
66
- | `sidekiq_systemd_service_template_path` | Local path to the ERB template that will be used to create the systemd unit <br>**Default:** [service.erb](https://github.com/mattbrictson/tomo-plugin-sidekiq/blob/master/lib/tomo/plugin/sidekiq/service.erb) |
66
+ | `sidekiq_systemd_service_template_path` | Local path to the ERB template that will be used to create the systemd unit <br>**Default:** [service.erb](https://github.com/mattbrictson/tomo-plugin-sidekiq/blob/main/lib/tomo/plugin/sidekiq/service.erb) |
67
67
 
68
68
  ## Tasks
69
69
 
@@ -135,6 +135,8 @@ Add a `config/sidekiq.yml` file to your application (i.e. checked into git) and
135
135
  :queues:
136
136
  - default
137
137
  - mailers
138
+ - active_storage_analysis
139
+ - active_storage_purge
138
140
 
139
141
  :concurrency: <%= ENV.fetch("SIDEKIQ_CONCURRENCY", "1") %>
140
142
  ```
@@ -2,18 +2,11 @@ require "tomo"
2
2
  require_relative "sidekiq/tasks"
3
3
  require_relative "sidekiq/version"
4
4
 
5
- module Tomo
6
- module Plugin
7
- module Sidekiq
8
- extend Tomo::PluginDSL
5
+ module Tomo::Plugin::Sidekiq
6
+ extend Tomo::PluginDSL
9
7
 
10
- tasks Tomo::Plugin::Sidekiq::Tasks
11
-
12
- # rubocop:disable Layout/LineLength
13
- defaults sidekiq_systemd_service: "sidekiq_%{application}.service",
14
- sidekiq_systemd_service_path: ".config/systemd/user/%{sidekiq_systemd_service}",
15
- sidekiq_systemd_service_template_path: File.expand_path("sidekiq/service.erb", __dir__)
16
- # rubocop:enable Layout/LineLength
17
- end
18
- end
8
+ tasks Tomo::Plugin::Sidekiq::Tasks
9
+ defaults sidekiq_systemd_service: "sidekiq_%{application}.service",
10
+ sidekiq_systemd_service_path: ".config/systemd/user/%{sidekiq_systemd_service}",
11
+ sidekiq_systemd_service_template_path: File.expand_path("sidekiq/service.erb", __dir__)
19
12
  end
@@ -19,4 +19,4 @@ WorkingDirectory=<%= paths.current %>
19
19
  Environment=MALLOC_ARENA_MAX=2
20
20
 
21
21
  [Install]
22
- WantedBy=multi-user.target
22
+ WantedBy=default.target
@@ -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
@@ -21,9 +19,7 @@ module Tomo::Plugin::Sidekiq
21
19
  end
22
20
 
23
21
  def log
24
- remote.attach "journalctl", "-q",
25
- raw("--user-unit=#{service.name.shellescape}"),
26
- *settings[:run_args]
22
+ remote.attach "journalctl", "-q", raw("--user-unit=#{service.name.shellescape}"), *settings[:run_args]
27
23
  end
28
24
 
29
25
  private
@@ -37,9 +33,7 @@ module Tomo::Plugin::Sidekiq
37
33
  end
38
34
 
39
35
  def linger_must_be_enabled!
40
- linger_users = remote.list_files(
41
- "/var/lib/systemd/linger", raise_on_error: false
42
- )
36
+ linger_users = remote.list_files("/var/lib/systemd/linger", raise_on_error: false)
43
37
  return if dry_run? || linger_users.include?(remote.host.user)
44
38
 
45
39
  die <<~ERROR.strip
@@ -1,7 +1,8 @@
1
1
  module Tomo
2
2
  module Plugin
3
- module Sidekiq
4
- VERSION = "0.3.0".freeze
5
- end
6
3
  end
7
4
  end
5
+
6
+ module Tomo::Plugin::Sidekiq
7
+ VERSION = "1.0.4".freeze
8
+ end
metadata CHANGED
@@ -1,128 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tomo-plugin-sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brictson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-26 00:00:00.000000000 Z
11
+ date: 2021-02-08 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
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 0.9.0
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: 0.9.0
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '2.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '2.0'
41
- - !ruby/object:Gem::Dependency
42
- name: minitest
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '5.11'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '5.11'
55
- - !ruby/object:Gem::Dependency
56
- name: minitest-ci
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '3.4'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
16
  requirements:
66
17
  - - "~>"
67
18
  - !ruby/object:Gem::Version
68
- version: '3.4'
69
- - !ruby/object:Gem::Dependency
70
- name: minitest-reporters
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '1.3'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '1.3'
83
- - !ruby/object:Gem::Dependency
84
- name: rake
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '13.0'
90
- type: :development
19
+ version: '1.0'
20
+ type: :runtime
91
21
  prerelease: false
92
22
  version_requirements: !ruby/object:Gem::Requirement
93
23
  requirements:
94
24
  - - "~>"
95
25
  - !ruby/object:Gem::Version
96
- version: '13.0'
97
- - !ruby/object:Gem::Dependency
98
- name: rubocop
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - '='
102
- - !ruby/object:Gem::Version
103
- version: 0.79.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.79.0
111
- - !ruby/object:Gem::Dependency
112
- name: rubocop-performance
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - '='
116
- - !ruby/object:Gem::Version
117
- version: 1.5.2
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - '='
123
- - !ruby/object:Gem::Version
124
- version: 1.5.2
125
- description:
26
+ version: '1.0'
27
+ description:
126
28
  email:
127
29
  - opensource@mattbrictson.com
128
30
  executables: []
@@ -143,7 +45,7 @@ metadata:
143
45
  changelog_uri: https://github.com/mattbrictson/tomo-plugin-sidekiq/releases
144
46
  source_code_uri: https://github.com/mattbrictson/tomo-plugin-sidekiq
145
47
  homepage_uri: https://github.com/mattbrictson/tomo-plugin-sidekiq
146
- post_install_message:
48
+ post_install_message:
147
49
  rdoc_options: []
148
50
  require_paths:
149
51
  - lib
@@ -151,15 +53,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
151
53
  requirements:
152
54
  - - ">="
153
55
  - !ruby/object:Gem::Version
154
- version: 2.4.0
56
+ version: 2.5.0
155
57
  required_rubygems_version: !ruby/object:Gem::Requirement
156
58
  requirements:
157
59
  - - ">="
158
60
  - !ruby/object:Gem::Version
159
61
  version: '0'
160
62
  requirements: []
161
- rubygems_version: 3.1.2
162
- signing_key:
63
+ rubygems_version: 3.2.7
64
+ signing_key:
163
65
  specification_version: 4
164
66
  summary: sidekiq tasks for tomo
165
67
  test_files: []