runner_helper 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/generators/runner_helper/runner_helper_generator.rb +2 -2
- data/lib/generators/runner_helper/templates/runner_helper.rb.erb +1 -1
- data/lib/generators/runner_helper/templates/unit.service.erb +2 -2
- data/lib/runner_helper/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9b96944d44df47bde90973a8415342a3c816509
|
4
|
+
data.tar.gz: 48be5a0988fe7e377a1d425c83a4632b9dfd4baf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33589eb73a9246215f284901cd446eaee8401bf1464d347e165373fae11d1665317aa867f4057b107bd96abb619fa3e7f0a6accb6ab83ccc20c7008991c2e2f0
|
7
|
+
data.tar.gz: b98f10d1481444bd6b624fa9447a788ae2a1a35f1a55bc35f8243b08b6bebe2f4a12f8fe3f1db772ff10fc255f8a26585606e511a169aa9ba1773f291e1cce72
|
data/README.md
CHANGED
@@ -22,7 +22,7 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
$ rails g runner billing
|
24
24
|
|
25
|
-
creates `
|
25
|
+
creates `BillingRunner` class file `app/runners/billing_runner.rb` with systemd unit file `vendor/systemd/billing_runner.service`. Implement your business logic in `run_once` method.
|
26
26
|
|
27
27
|
## Contributing
|
28
28
|
|
@@ -15,10 +15,10 @@ class RunnerHelperGenerator < Rails::Generators::NamedBase
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def gen_runner_class
|
18
|
-
template('runner_helper.rb.erb', "app/runners/#{file_name}.rb")
|
18
|
+
template('runner_helper.rb.erb', "app/runners/#{file_name}_runner.rb")
|
19
19
|
end
|
20
20
|
|
21
21
|
def gen_unit_file
|
22
|
-
template('unit.service.erb', "vendor/systemd/#{file_name}.service")
|
22
|
+
template('unit.service.erb', "vendor/systemd/#{file_name}_runner.service")
|
23
23
|
end
|
24
24
|
end
|
@@ -5,7 +5,7 @@ After=syslog.target network.target
|
|
5
5
|
[Service]
|
6
6
|
Type=simple
|
7
7
|
WorkingDirectory=/home/deploy/<%= application_name %>/current
|
8
|
-
ExecStart=/bin/bash -lc 'rails runner -e production "<%= class_name
|
8
|
+
ExecStart=/bin/bash -lc 'rails runner -e production "<%= class_name %>Runner.new.service"'
|
9
9
|
User=<%= username %>
|
10
10
|
Group=<%= username %>
|
11
11
|
UMask=0002
|
@@ -16,7 +16,7 @@ Restart=on-failure
|
|
16
16
|
StandardOutput=syslog
|
17
17
|
StandardError=syslog
|
18
18
|
|
19
|
-
SyslogIdentifier=<%= file_name %>
|
19
|
+
SyslogIdentifier=<%= file_name %>_runner
|
20
20
|
|
21
21
|
[Install]
|
22
22
|
WantedBy=multi-user.target
|