mina-delayed_job 0.1.0 → 1.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -7
- data/lib/mina/delayed_job/tasks.rb +29 -78
- data/lib/mina/delayed_job/version.rb +1 -1
- data/mina-delayed_job.gemspec +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19426ac9cc9d5dacccf5eae581d5b2ec2337562c
|
4
|
+
data.tar.gz: 6691068aa9e6a9efe5a94f1d5f63c3b7d360c61f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97a0bb65387d9a050e726b12cdc09faac8b144ac99238c19ca75d807555aa4869c82219d705cd139c62346816174c1116e2cc64c78035b8656125e5626463dac
|
7
|
+
data.tar.gz: 31380c5387007ba78b79d92fa8f72411db1e36e4d09f1300f27db761ad2a5feaa53079ae8228c7dc65d19998719af9a4b6f5f7756dd9693c791432976bb3ebb5
|
data/README.md
CHANGED
@@ -25,24 +25,23 @@ Any and all of these settings can be overriden in your `deploy.rb`.
|
|
25
25
|
|
26
26
|
Sets the path to delayed_job.
|
27
27
|
|
28
|
-
|
28
|
+
set :delayed_job, lambda { "bin/delayed_job" }
|
29
29
|
|
30
30
|
Sets the dir to the pid files of a delayed_job workers
|
31
31
|
|
32
|
-
|
32
|
+
set :delayed_job_pid_dir, 'pids'
|
33
33
|
|
34
34
|
Sets the number of delayed_job processes launched
|
35
35
|
|
36
36
|
set_default :delayed_job_processes, 1
|
37
37
|
|
38
|
+
Sets some additional parameters
|
39
|
+
|
40
|
+
set_default :delayed_job_additional_params, ''
|
41
|
+
|
38
42
|
### Usage example
|
39
43
|
|
40
44
|
require 'mina/delayed_job'
|
41
|
-
...
|
42
|
-
task :setup do
|
43
|
-
# delayed_job needs a place to store its pid file
|
44
|
-
invoke :'delayed_job:setup'
|
45
|
-
end
|
46
45
|
|
47
46
|
task :deploy do
|
48
47
|
deploy do
|
@@ -1,91 +1,42 @@
|
|
1
|
-
# # Modules: DelayedJob
|
2
|
-
# Adds settings and tasks for managing DelayedJob workers.
|
3
|
-
#
|
4
|
-
# ## Usage example
|
5
|
-
# require 'mina/delayed_job'
|
6
|
-
# ...
|
7
|
-
# task :setup do
|
8
|
-
# # delayed_job needs a place to store its pid file
|
9
|
-
# invoke :'delayed_job:setup'
|
10
|
-
# end
|
11
|
-
#
|
12
|
-
# task :deploy do
|
13
|
-
# deploy do
|
14
|
-
# invoke :'git:clone'
|
15
|
-
# ...
|
16
|
-
#
|
17
|
-
# to :launch do
|
18
|
-
# ...
|
19
|
-
# invoke :'delayed_job:restart'
|
20
|
-
# end
|
21
|
-
# end
|
22
|
-
# end
|
23
|
-
|
24
1
|
require 'mina/bundler'
|
25
2
|
require 'mina/rails'
|
26
3
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
set_default :delayed_job, lambda { "bin/delayed_job" }
|
33
|
-
|
34
|
-
# ### delayed_job_pid_dir
|
35
|
-
# Sets the dir to the pid files of a delayed_job workers
|
36
|
-
set_default :delayed_job_pid_dir, lambda { "#{deploy_to}/#{shared_path}/pids" }
|
37
|
-
|
38
|
-
# ### delayed_job_processes
|
39
|
-
# Sets the number of delayed_job processes launched
|
40
|
-
set_default :delayed_job_processes, 1
|
4
|
+
set :delayed_job, -> { 'bin/delayed_job' }
|
5
|
+
set :delayed_job_pid_dir, 'pids'
|
6
|
+
set :delayed_job_processes, 1
|
7
|
+
set :delayed_job_additional_params, ''
|
8
|
+
set :shared_dirs, -> { fetch(:shared_dirs, []).push(fetch(:delayed_job_pid_dir)) }
|
41
9
|
|
42
|
-
set_default :delayed_job_additional_params, ''
|
43
|
-
|
44
|
-
# ## Control Tasks
|
45
10
|
namespace :delayed_job do
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
# ### delayed_job:stop
|
53
|
-
desc "Stop delayed_job"
|
54
|
-
task :stop => :environment do
|
55
|
-
queue %[echo "-----> Stop delayed_job"]
|
56
|
-
queue %[
|
57
|
-
cd "#{deploy_to}/#{current_path}"
|
58
|
-
#{echo_cmd %[RAILS_ENV="#{rails_env}" #{delayed_job} #{delayed_job_additional_params} stop --pid-dir=#{delayed_job_pid_dir} ]}
|
59
|
-
]
|
11
|
+
desc 'Stop delayed_job'
|
12
|
+
task stop: :environment do
|
13
|
+
comment 'Stop delayed_job'
|
14
|
+
in_path(fetch(:current_path)) do
|
15
|
+
command "RAILS_ENV='#{fetch(:rails_env)}' #{fetch(:delayed_job)} #{fetch(:delayed_job_additional_params)} stop --pid-dir='#{fetch(:shared_path)}/#{fetch(:delayed_job_pid_dir)}'"
|
16
|
+
end
|
60
17
|
end
|
61
18
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
#{echo_cmd %[RAILS_ENV="#{rails_env}" #{delayed_job} #{delayed_job_additional_params} start -n #{delayed_job_processes} --pid-dir=#{delayed_job_pid_dir }] }
|
69
|
-
}
|
19
|
+
desc 'Start delayed_job'
|
20
|
+
task start: :environment do
|
21
|
+
comment 'Start delayed_job'
|
22
|
+
in_path(fetch(:current_path)) do
|
23
|
+
command "RAILS_ENV='#{fetch(:rails_env)}' #{fetch(:delayed_job)} #{fetch(:delayed_job_additional_params)} start -n #{delayed_job_processes} --pid-dir='#{fetch(:shared_path)}/#{fetch(:delayed_job_pid_dir)}'"
|
24
|
+
end
|
70
25
|
end
|
71
26
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
#{echo_cmd %[RAILS_ENV="#{rails_env}" #{delayed_job} #{delayed_job_additional_params} restart -n #{delayed_job_processes} --pid-dir=#{delayed_job_pid_dir }] }
|
79
|
-
}
|
27
|
+
desc 'Restart delayed_job'
|
28
|
+
task restart: :environment do
|
29
|
+
comment 'Restart delayed_job'
|
30
|
+
in_path(fetch(:current_path)) do
|
31
|
+
command "RAILS_ENV='#{fetch(:rails_env)}' #{fetch(:delayed_job)} #{fetch(:delayed_job_additional_params)} restart -n #{delayed_job_processes} --pid-dir='#{fetch(:shared_path)}/#{fetch(:delayed_job_pid_dir)}'"
|
32
|
+
end
|
80
33
|
end
|
81
34
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
#{echo_cmd %[RAILS_ENV="#{rails_env}" #{delayed_job} #{delayed_job_additional_params} status --pid-dir=#{delayed_job_pid_dir }] }
|
89
|
-
}
|
35
|
+
desc 'delayed_job status'
|
36
|
+
task status: :environment do
|
37
|
+
comment 'Delayed job Status'
|
38
|
+
in_path(fetch(:current_path)) do
|
39
|
+
command "RAILS_ENV='#{fetch(:rails_env)}' #{fetch(:delayed_job)} #{fetch(:delayed_job_additional_params)} status --pid-dir='#{fetch(:shared_path)}/#{fetch(:delayed_job_pid_dir)}'"
|
40
|
+
end
|
90
41
|
end
|
91
42
|
end
|
data/mina-delayed_job.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mina-delayed_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stjepan Hadjic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: mina
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 1.0.0.beta1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 1.0.0.beta1
|
55
55
|
description: Added tasks for working with delayed job
|
56
56
|
email:
|
57
57
|
- d4be4st@gmail.com
|
@@ -83,12 +83,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
83
83
|
version: '0'
|
84
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- - "
|
86
|
+
- - ">"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version:
|
88
|
+
version: 1.3.1
|
89
89
|
requirements: []
|
90
90
|
rubyforge_project:
|
91
|
-
rubygems_version: 2.
|
91
|
+
rubygems_version: 2.5.1
|
92
92
|
signing_key:
|
93
93
|
specification_version: 4
|
94
94
|
summary: Mina plugin for delayed job
|