easy_ml 0.2.0.pre.rc10 → 0.2.0.pre.rc11

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: 798cbe6a945c8321a2289622602ff4a0c71b6f3558eff1523a0352107cd41473
4
- data.tar.gz: 4795d77060af37384555cea4e2a3c2c6c0f4ce9577d3fdc91b73b6aca0f864d3
3
+ metadata.gz: 359318d80a26cadd767fdae12e3dd4ac790c2ff757994608de368873462af4c7
4
+ data.tar.gz: 000fdfd652cfcd11a99a80b095bd3ab9653e013d2627fbb0b747bae57addec2b
5
5
  SHA512:
6
- metadata.gz: 921c16d1d885c441eee2b5249d4eb4eb8fa988d7ef5768579bc76c1784cef55f4cc40b0ad2c2c81fd28fb66f246a8f67b89637e48a05b4abcf6454ede516383a
7
- data.tar.gz: '0039a45b69bfe5c7e306305e980784b509e4721e04a2775209a6200155fa407e58fb2efb058fb3dffde725a74c51555493f4337df67c6793a356dba31b286128'
6
+ metadata.gz: 07b960ad72f84f90964b71818f7c14572a5c6620995ee6e8000427b86ddb8976d0f1a7753c67b7d7eec5a753d8d58aad50a225dca775db3f6481f3cc2399c1f2
7
+ data.tar.gz: fdf23f56dc00eb3deb8209f34b6e1891b265b2209c4af091ed05bb1835d63d7cd161e1038e0016466d3ab837af6a9758a1f57846281190622e55b4476806d02b
@@ -0,0 +1,10 @@
1
+ module EasyML
2
+ class HealthController < ApplicationController
3
+ # No authentication or CSRF checks for this action
4
+ skip_before_action :verify_authenticity_token
5
+
6
+ def up
7
+ render json: { status: "OK" }, status: :ok
8
+ end
9
+ end
10
+ end
@@ -1,3 +1,9 @@
1
- require 'resque'
2
- Resque.redis = ENV['REDIS_URL'] || 'redis://localhost:6379'
1
+ require "resque"
3
2
 
3
+ gem_path = Gem::Specification.find_by_name("easy_ml").gem_dir
4
+ Resque::Pool.configure do |config|
5
+ config.path = File.join(gem_path, "config", "resque-pool.yml")
6
+ puts "Resque pool config: #{config.path}"
7
+ end
8
+
9
+ Resque.redis = ENV["REDIS_URL"] || "redis://localhost:6379"
@@ -1,6 +1,6 @@
1
1
  development:
2
- '*': 2
2
+ 'easy_ml': 5
3
3
 
4
4
  production:
5
- '*': <%= ENV['WORKER_COUNT'] || 5 %>
5
+ 'easy_ml': <%= ENV['WORKER_COUNT'] || 5 %>
6
6
 
data/config/routes.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  EasyML::Engine.routes.draw do
2
2
  root to: "models#index"
3
+ get "healthcheck", to: "health#up"
3
4
  resources :models, as: :easy_ml_models do
4
5
  member do
5
6
  post :train
@@ -65,6 +65,9 @@ module EasyML
65
65
  end
66
66
 
67
67
  initializer "easy_ml.active_job_config" do
68
+ resque_initializer = File.expand_path("config/initializers/resque.rb", root)
69
+ require resque_initializer if File.exist?(resque_initializer)
70
+
68
71
  ActiveSupport.on_load(:active_job) do
69
72
  self.queue_adapter = :resque
70
73
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EasyML
4
- VERSION = "0.2.0-rc10"
4
+ VERSION = "0.2.0-rc11"
5
5
 
6
6
  module Version
7
7
  end
@@ -0,0 +1,13 @@
1
+ namespace :easy_ml do
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")
7
+
8
+ ENV["RESQUE_POOL_CONFIG"] = config_path
9
+ puts "Starting resque-pool with config: #{config_path}"
10
+
11
+ exec "bundle exec resque-pool --environment #{ENV["RAILS_ENV"] || "development"} --config #{config_path}"
12
+ end
13
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_ml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.pre.rc10
4
+ version: 0.2.0.pre.rc11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Shollenberger
@@ -444,6 +444,7 @@ files:
444
444
  - app/controllers/easy_ml/datasets_controller.rb
445
445
  - app/controllers/easy_ml/datasources_controller.rb
446
446
  - app/controllers/easy_ml/deploys_controller.rb
447
+ - app/controllers/easy_ml/health_controller.rb
447
448
  - app/controllers/easy_ml/models_controller.rb
448
449
  - app/controllers/easy_ml/retraining_runs_controller.rb
449
450
  - app/controllers/easy_ml/settings_controller.rb
@@ -658,6 +659,7 @@ files:
658
659
  - lib/easy_ml/support/synced_file.rb
659
660
  - lib/easy_ml/support/utc.rb
660
661
  - lib/easy_ml/version.rb
662
+ - lib/tasks/resque.rake
661
663
  - lib/tasks/vite.rake
662
664
  - public/easy_ml/assets/.vite/manifest-assets.json
663
665
  - public/easy_ml/assets/.vite/manifest.json