easy_ml 0.2.0.pre.rc18 → 0.2.0.pre.rc19
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/Rakefile +0 -27
- data/lib/easy_ml/version.rb +1 -1
- data/lib/tasks/resque.rake +6 -11
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e7bba5853eeb51514a48feec567e616c70510c35b7a0a7576cdbcbe1b3a2b13
|
4
|
+
data.tar.gz: 04bc59714adeea060bf52474a89f656e596fb40363befe6aa093af7a22dfb7ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8a3b60288b2eb040ce9ddd52c53dcab47b37445abf4ffc8d09a4577e7d1df110e057459a9d6af5da2699b660f50737ad5f8e228798da20b1f20e4a8b99765d9
|
7
|
+
data.tar.gz: '074554608985b4a53853790cf0ac4b371f044efd4664e647160a15af4e70e6c2803cdb2f9196cebadb42238624e8c385a06cd5ed02ae342e5dea6693bf409a05'
|
data/Rakefile
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
require "sprockets/railtie"
|
4
4
|
require "bundler/gem_tasks"
|
5
5
|
require "rspec/core/rake_task"
|
6
|
-
require "resque/tasks"
|
7
6
|
|
8
7
|
RSpec::Core::RakeTask.new(:spec)
|
9
8
|
|
@@ -56,29 +55,3 @@ namespace :easy_ml do
|
|
56
55
|
Rails::Generators.invoke("easy_ml:migration", [], { destination_root: EasyML::Engine.root.join("spec/internal") })
|
57
56
|
end
|
58
57
|
end
|
59
|
-
|
60
|
-
task :environment do
|
61
|
-
# Force the application to load (Rails or standalone app setup)
|
62
|
-
require File.expand_path("config/environment", __dir__)
|
63
|
-
end
|
64
|
-
|
65
|
-
# Ensure resque:work depends on :environment
|
66
|
-
namespace :resque do
|
67
|
-
desc "Start a Resque worker"
|
68
|
-
task :easy_ml => [:preload, :setup] do
|
69
|
-
require "resque"
|
70
|
-
|
71
|
-
begin
|
72
|
-
worker = Resque::Worker.new
|
73
|
-
rescue Resque::NoQueueError
|
74
|
-
abort "set QUEUE env var, e.g. $ QUEUE=critical,high rake resque:work"
|
75
|
-
end
|
76
|
-
|
77
|
-
worker.prepare
|
78
|
-
worker.log "Starting worker #{worker}"
|
79
|
-
worker.work(ENV["INTERVAL"] || 5) # interval, will block
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
task "resque:work" => :environment
|
84
|
-
task "resque:workers" => :environment
|
data/lib/easy_ml/version.rb
CHANGED
data/lib/tasks/resque.rake
CHANGED
@@ -1,13 +1,8 @@
|
|
1
|
-
|
2
|
-
desc "Start resque-pool with the gem's configuration"
|
3
|
-
task :resque_pool do
|
4
|
-
require "resque"
|
5
|
-
gem_path = Gem::Specification.find_by_name("easy_ml").gem_dir
|
6
|
-
config_path = File.join(gem_path, "config", "resque-pool.yml")
|
1
|
+
require "resque/tasks"
|
7
2
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
exec "bundle exec resque-pool --environment #{ENV["RAILS_ENV"] || "development"} --config #{config_path}"
|
12
|
-
end
|
3
|
+
task :environment do
|
4
|
+
require File.expand_path("config/environment", Rails.root)
|
13
5
|
end
|
6
|
+
|
7
|
+
task "resque:work" => :environment
|
8
|
+
task "resque:workers" => :environment
|