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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd46d7d6738c8150231e76f0bfc7f1fb0a3502f1
4
- data.tar.gz: af52a874ba7ee58813219eae5f6d8493ff1ad040
3
+ metadata.gz: 19426ac9cc9d5dacccf5eae581d5b2ec2337562c
4
+ data.tar.gz: 6691068aa9e6a9efe5a94f1d5f63c3b7d360c61f
5
5
  SHA512:
6
- metadata.gz: 769839f84760b86c60dbec89634c3ef8fe6a1316305607d2b00a4b6b2c12a684af60bf0e4afb7451cff0334d616bbd3a5b3cd0586f4a5bf24076582f27db1001
7
- data.tar.gz: e6e9bea7c90b3bae8d528a508ac2ca3cf84ed8c204d8645924f13e4616d8ced433f3ea84097ec6cdc9ab84b6c99c175c292c1a3bc68525d7364aa3de5257c167
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
- set_default :delayed_job, lambda { "bin/delayed_job" }
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
- set_default :delayed_job_pid_dir, lambda { "#{deploy_to}/#{shared_path}/pids" }
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
- # ## Settings
28
- # Any and all of these settings can be overriden in your `deploy.rb`.
29
-
30
- # ### delayed_job
31
- # Sets the path to delayed_job.
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
- # ### delayed_job:setup
47
- desc "Setup delayed_job"
48
- task :setup => :environment do
49
- queue! %[mkdir -p "#{delayed_job_pid_dir}"]
50
- end
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
- # ### delayed_job:start
63
- desc "Start delayed_job"
64
- task :start => :environment do
65
- queue %[echo "-----> Start delayed_job"]
66
- queue %{
67
- cd "#{deploy_to}/#{current_path}"
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
- # ### delayed_job:restart
73
- desc "Restart delayed_job"
74
- task :restart => :environment do
75
- queue %[echo "-----> Restart delayed_job"]
76
- queue %{
77
- cd "#{deploy_to}/#{current_path}"
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
- # ### delayed_job:status
83
- desc "delayed_job status"
84
- task :status => :environment do
85
- queue %[echo "-----> Delayed_job Status"]
86
- queue %{
87
- cd "#{deploy_to}/#{current_path}"
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
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  module DelayedJob
3
- VERSION = "0.1.0"
3
+ VERSION = '1.0.0.beta1'
4
4
  end
5
5
  end
@@ -21,5 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "bundler", "~> 1.7"
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
23
 
24
- spec.add_dependency 'mina', '~> 0'
24
+ spec.add_dependency 'mina', '1.0.0.beta1'
25
25
  end
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.1.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-02-16 00:00:00.000000000 Z
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: '0'
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: '0'
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: '0'
88
+ version: 1.3.1
89
89
  requirements: []
90
90
  rubyforge_project:
91
- rubygems_version: 2.4.5
91
+ rubygems_version: 2.5.1
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: Mina plugin for delayed job