28 lines
1007 B
Ruby
28 lines
1007 B
Ruby
Rails.application.routes.draw do
|
|
if ENV['worker_num']=='0' && File.basename($0) != 'rake' && !Rails.const_defined?('Console')
|
|
Thread.new do
|
|
c = Cancerpredictfields.last
|
|
if c
|
|
sleep(5)
|
|
c.save
|
|
c.auto_write_predict_js
|
|
end
|
|
end
|
|
end
|
|
locales = Site.first.in_use_locales rescue I18n.available_locales
|
|
|
|
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
|
namespace :admin do
|
|
get 'cancerpredicts' , to: 'cancerpredicts#index'
|
|
get 'editCancerpredicts' , to: 'cancerpredicts#edit'
|
|
post 'editCancerpredicts' , to: 'cancerpredicts#edit'
|
|
patch 'editCancerpredicts' , to: 'cancerpredicts#edit'
|
|
get 'cancerpredicts/showSubmit' , to: 'cancerpredicts#showSubmit'
|
|
get 'cancerpredicts/export_cancer_tool_record' , to: 'cancerpredicts#export_cancer_tool_record'
|
|
resources :cancerpredicts
|
|
end
|
|
get "cancerpredictResult", to: "cancerpredicts#calculate"
|
|
post "cancerpredictResult", to: "cancerpredicts#calculate"
|
|
end
|
|
end
|