Fix kiqit gem
This commit is contained in:
parent
9ba39f5d32
commit
daa248dccd
7
Gemfile
7
Gemfile
|
@ -12,14 +12,9 @@ gem 'pundit'
|
||||||
gem 'paperclip'
|
gem 'paperclip'
|
||||||
gem 'sinatra', :require => nil
|
gem 'sinatra', :require => nil
|
||||||
gem 'sidekiq'
|
gem 'sidekiq'
|
||||||
gem 'kiqit'
|
gem 'kiqit', :git => 'https://github.com/DuratarskeyK/kiqit.git'
|
||||||
gem 'sidekiq-scheduler', '~> 2.0'
|
gem 'sidekiq-scheduler', '~> 2.0'
|
||||||
gem 'sidekiq-failures'
|
gem 'sidekiq-failures'
|
||||||
#gem 'resque'
|
|
||||||
#gem 'resque-status'
|
|
||||||
#gem 'resque_mailer'
|
|
||||||
#gem 'resque-scheduler', '~>2.5.4'
|
|
||||||
#gem 'perform_later', git: 'git://github.com/KensoDev/perform_later.git' # should be after resque_mailer
|
|
||||||
gem 'russian'
|
gem 'russian'
|
||||||
gem 'state_machines-activerecord'
|
gem 'state_machines-activerecord'
|
||||||
gem 'redis-rails'
|
gem 'redis-rails'
|
||||||
|
|
27
Gemfile.lock
27
Gemfile.lock
|
@ -1,6 +1,6 @@
|
||||||
GIT
|
GIT
|
||||||
remote: git://github.com/activeadmin/activeadmin.git
|
remote: git://github.com/activeadmin/activeadmin.git
|
||||||
revision: cce908d9793ba1fce8483afe5e4112f97d7d0857
|
revision: 1b5c9259c4cfe183039498e0e1eb2c6c146d2273
|
||||||
specs:
|
specs:
|
||||||
activeadmin (1.0.0.pre2)
|
activeadmin (1.0.0.pre2)
|
||||||
arbre (~> 1.0, >= 1.0.2)
|
arbre (~> 1.0, >= 1.0.2)
|
||||||
|
@ -17,6 +17,14 @@ GIT
|
||||||
sass-rails
|
sass-rails
|
||||||
sprockets (< 4)
|
sprockets (< 4)
|
||||||
|
|
||||||
|
GIT
|
||||||
|
remote: https://github.com/DuratarskeyK/kiqit.git
|
||||||
|
revision: 5ce2a3b3857ffe276e2a3e7929f12e73ff35b9c4
|
||||||
|
specs:
|
||||||
|
kiqit (2.4.0)
|
||||||
|
activerecord
|
||||||
|
sidekiq
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
remote: https://rails-assets.org/
|
remote: https://rails-assets.org/
|
||||||
|
@ -59,7 +67,7 @@ GEM
|
||||||
addressable (2.4.0)
|
addressable (2.4.0)
|
||||||
airbrake (5.3.0)
|
airbrake (5.3.0)
|
||||||
airbrake-ruby (~> 1.3)
|
airbrake-ruby (~> 1.3)
|
||||||
airbrake-ruby (1.3.1)
|
airbrake-ruby (1.3.2)
|
||||||
angular-i18n (0.1.2)
|
angular-i18n (0.1.2)
|
||||||
angular-rails-templates (1.0.0)
|
angular-rails-templates (1.0.0)
|
||||||
railties (>= 4.2, < 6)
|
railties (>= 4.2, < 6)
|
||||||
|
@ -176,7 +184,7 @@ GEM
|
||||||
railties (>= 3.2, < 5)
|
railties (>= 3.2, < 5)
|
||||||
responders
|
responders
|
||||||
its-it (1.2.1)
|
its-it (1.2.1)
|
||||||
jbuilder (2.4.1)
|
jbuilder (2.5.0)
|
||||||
activesupport (>= 3.0.0, < 5.1)
|
activesupport (>= 3.0.0, < 5.1)
|
||||||
multi_json (~> 1.2)
|
multi_json (~> 1.2)
|
||||||
jquery-rails (4.1.1)
|
jquery-rails (4.1.1)
|
||||||
|
@ -185,17 +193,14 @@ GEM
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
jquery-ui-rails (5.0.5)
|
jquery-ui-rails (5.0.5)
|
||||||
railties (>= 3.2.16)
|
railties (>= 3.2.16)
|
||||||
js-routes (1.2.5)
|
js-routes (1.2.6)
|
||||||
railties (>= 3.2)
|
railties (>= 3.2)
|
||||||
sprockets-rails
|
sprockets-rails
|
||||||
json (1.8.3)
|
json (1.8.3)
|
||||||
kaminari (0.16.3)
|
kaminari (0.17.0)
|
||||||
actionpack (>= 3.0.0)
|
actionpack (>= 3.0.0)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
key_struct (0.4.2)
|
key_struct (0.4.2)
|
||||||
kiqit (2.4.0)
|
|
||||||
activerecord
|
|
||||||
sidekiq (> 2.5)
|
|
||||||
libv8 (3.16.14.15)
|
libv8 (3.16.14.15)
|
||||||
localeapp (1.0.2)
|
localeapp (1.0.2)
|
||||||
gli
|
gli
|
||||||
|
@ -345,7 +350,7 @@ GEM
|
||||||
http-cookie (>= 1.0.2, < 2.0)
|
http-cookie (>= 1.0.2, < 2.0)
|
||||||
mime-types (>= 1.16, < 3.0)
|
mime-types (>= 1.16, < 3.0)
|
||||||
netrc (~> 0.7)
|
netrc (~> 0.7)
|
||||||
rr (1.1.2)
|
rr (1.2.0)
|
||||||
rspec-core (3.4.4)
|
rspec-core (3.4.4)
|
||||||
rspec-support (~> 3.4.0)
|
rspec-support (~> 3.4.0)
|
||||||
rspec-expectations (3.4.0)
|
rspec-expectations (3.4.0)
|
||||||
|
@ -502,7 +507,7 @@ GEM
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
thor (0.19.1)
|
thor (0.19.1)
|
||||||
thread_safe (0.3.5)
|
thread_safe (0.3.5)
|
||||||
tilt (2.0.4)
|
tilt (2.0.5)
|
||||||
time_diff (0.3.0)
|
time_diff (0.3.0)
|
||||||
activesupport
|
activesupport
|
||||||
i18n
|
i18n
|
||||||
|
@ -546,7 +551,7 @@ DEPENDENCIES
|
||||||
hirb
|
hirb
|
||||||
jbuilder
|
jbuilder
|
||||||
js-routes
|
js-routes
|
||||||
kiqit
|
kiqit!
|
||||||
localeapp
|
localeapp
|
||||||
mailcatcher
|
mailcatcher
|
||||||
meta-tags
|
meta-tags
|
||||||
|
|
|
@ -104,20 +104,20 @@ class Projects::BuildListsController < Projects::BaseController
|
||||||
project_ids = prs[:projects].select{ |k, v| v == '1' }.keys
|
project_ids = prs[:projects].select{ |k, v| v == '1' }.keys
|
||||||
arch_ids = prs[:arches]. select{ |k, v| v == '1' }.keys
|
arch_ids = prs[:arches]. select{ |k, v| v == '1' }.keys
|
||||||
#FIX
|
#FIX
|
||||||
# enqueue(
|
Sidekiq::Client.push(
|
||||||
# BuildLists::DependentPackagesJob,
|
'class' => BuildLists::DependentPackagesJob,
|
||||||
# @build_list.id,
|
'args' => [@build_list.id,
|
||||||
# current_user.id,
|
current_user.id,
|
||||||
# project_ids,
|
project_ids,
|
||||||
# arch_ids,
|
arch_ids,
|
||||||
# {
|
{
|
||||||
# auto_publish_status: prs[:auto_publish_status],
|
auto_publish_status: prs[:auto_publish_status],
|
||||||
# auto_create_container: prs[:auto_create_container],
|
auto_create_container: prs[:auto_create_container],
|
||||||
# include_testing_subrepository: prs[:include_testing_subrepository],
|
include_testing_subrepository: prs[:include_testing_subrepository],
|
||||||
# use_cached_chroot: prs[:use_cached_chroot],
|
use_cached_chroot: prs[:use_cached_chroot],
|
||||||
# use_extra_tests: prs[:use_extra_tests]
|
use_extra_tests: prs[:use_extra_tests]
|
||||||
# }
|
}]
|
||||||
# )
|
)
|
||||||
flash[:notice] = t('flash.build_list.dependent_projects_job_added_to_queue')
|
flash[:notice] = t('flash.build_list.dependent_projects_job_added_to_queue')
|
||||||
redirect_to build_list_path(@build_list)
|
redirect_to build_list_path(@build_list)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
module BuildLists
|
module BuildLists
|
||||||
class DependentPackagesJob
|
class DependentPackagesJob
|
||||||
@queue = :middle
|
sidekiq_options :queue => :middle
|
||||||
|
|
||||||
def self.perform(build_list_id, user_id, project_ids, arch_ids, options)
|
def perform(build_list_id, user_id, project_ids, arch_ids, options)
|
||||||
build_list = BuildList.find(build_list_id)
|
build_list = BuildList.find(build_list_id)
|
||||||
return if build_list.save_to_platform.personal?
|
return if build_list.save_to_platform.personal?
|
||||||
user = User.find(user_id)
|
user = User.find(user_id)
|
||||||
|
|
|
@ -1,65 +1,64 @@
|
||||||
- set_meta_tags title: [title_object(@build_list.project), t('activerecord.models.build_list')]
|
- set_meta_tags title: [title_object(@build_list.project), t('activerecord.models.build_list')]
|
||||||
|
|
||||||
= render 'submenu'
|
.row.top-space
|
||||||
|
.col-md-10.col-md-offset-1
|
||||||
|
rd-widget
|
||||||
|
rd-widget-header title=t('.title')
|
||||||
|
rd-widget-body
|
||||||
|
.row
|
||||||
|
= simple_form_for @build_list,
|
||||||
|
url: dependent_projects_build_list_path(@build_list),
|
||||||
|
html: { method: :post },
|
||||||
|
wrapper: :horizontal_form,
|
||||||
|
wrapper_mappings: { boolean: :horizontal_boolean,
|
||||||
|
select: :horizontal_select } do |f|
|
||||||
|
|
||||||
.container.col-md-offset-2.col-md-8
|
.col-md-6
|
||||||
h3
|
.row
|
||||||
= t('.title')
|
.col-sm-offset-3.col-sm-9
|
||||||
.row
|
h4
|
||||||
= simple_form_for @build_list,
|
= t('.projects')
|
||||||
url: dependent_projects_build_list_path(@build_list),
|
- @build_list.packages.each do |package|
|
||||||
html: { method: :post },
|
- dependent_projects(package).each do |project, packages|
|
||||||
wrapper: :horizontal_form,
|
.col-sm-offset-3.col-sm-9
|
||||||
wrapper_mappings: { boolean: :horizontal_boolean,
|
.checkbox
|
||||||
select: :horizontal_select } do |f|
|
label
|
||||||
|
input[type = "checkbox"
|
||||||
|
value = 1
|
||||||
|
name = "build_list[projects][#{project.id}]"
|
||||||
|
checked = true]
|
||||||
|
= link_to project.name_with_owner, project_path(project.name_with_owner)
|
||||||
|
span.help-block
|
||||||
|
=> t('.packages')
|
||||||
|
= packages * ', '
|
||||||
|
.col-md-6
|
||||||
|
.row
|
||||||
|
.col-sm-offset-3.col-sm-9
|
||||||
|
h4
|
||||||
|
= t('.architecture')
|
||||||
|
- arches = @build_list.build_for_platform.platform_arch_settings.by_default.pluck(:arch_id)
|
||||||
|
- Arch.recent.each do |arch|
|
||||||
|
.col-sm-offset-3.col-sm-9
|
||||||
|
.checkbox
|
||||||
|
label
|
||||||
|
input[type = 'checkbox'
|
||||||
|
value = 1
|
||||||
|
name = "build_list[arches][#{arch.id}]"
|
||||||
|
checked = arches.include?(arch.id)]
|
||||||
|
= arch.name
|
||||||
|
.row
|
||||||
|
.col-sm-offset-3.col-sm-9
|
||||||
|
h4
|
||||||
|
= t('.preferences')
|
||||||
|
= f.input :auto_publish_status, as: :select, collection: auto_publish_statuses,
|
||||||
|
include_blank: false
|
||||||
|
= f.input :auto_create_container, as: :boolean
|
||||||
|
= f.input :include_testing_subrepository, as: :boolean
|
||||||
|
= f.input :use_cached_chroot, as: :boolean
|
||||||
|
= f.input :use_extra_tests, as: :boolean
|
||||||
|
|
||||||
.col-md-6
|
.row
|
||||||
.row
|
.pull-right
|
||||||
.col-sm-offset-3.col-sm-9
|
=> f.button :submit, t('layout.create')
|
||||||
h4
|
a.btn.btn-primary href=build_list_path(@build_list)
|
||||||
= t('.projects')
|
= t('layout.cancel')
|
||||||
- @build_list.packages.each do |package|
|
|
||||||
- dependent_projects(package).each do |project, packages|
|
|
||||||
.col-sm-offset-3.col-sm-9
|
|
||||||
.checkbox
|
|
||||||
label
|
|
||||||
input[type = "checkbox"
|
|
||||||
value = 1
|
|
||||||
name = "build_list[projects][#{project.id}]"
|
|
||||||
checked = true]
|
|
||||||
= link_to project.name_with_owner, project_path(project.name_with_owner)
|
|
||||||
span.help-block
|
|
||||||
=> t('.packages')
|
|
||||||
= packages * ', '
|
|
||||||
.col-md-6
|
|
||||||
.row
|
|
||||||
.col-sm-offset-3.col-sm-9
|
|
||||||
h4
|
|
||||||
= t('.architecture')
|
|
||||||
- arches = @build_list.build_for_platform.platform_arch_settings.by_default.pluck(:arch_id)
|
|
||||||
- Arch.recent.each do |arch|
|
|
||||||
.col-sm-offset-3.col-sm-9
|
|
||||||
.checkbox
|
|
||||||
label
|
|
||||||
input[type = 'checkbox'
|
|
||||||
value = 1
|
|
||||||
name = "build_list[arches][#{arch.id}]"
|
|
||||||
checked = arches.include?(arch.id)]
|
|
||||||
= arch.name
|
|
||||||
.row
|
|
||||||
.col-sm-offset-3.col-sm-9
|
|
||||||
h4
|
|
||||||
= t('.preferences')
|
|
||||||
= f.input :auto_publish_status, as: :select, collection: auto_publish_statuses,
|
|
||||||
include_blank: false
|
|
||||||
= f.input :auto_create_container, as: :boolean
|
|
||||||
= f.input :include_testing_subrepository, as: :boolean
|
|
||||||
= f.input :use_cached_chroot, as: :boolean
|
|
||||||
= f.input :use_extra_tests, as: :boolean
|
|
||||||
|
|
||||||
.row
|
|
||||||
.col-sm-offset-3.col-sm-9
|
|
||||||
hr
|
|
||||||
=> f.button :submit, t('layout.create')
|
|
||||||
a.btn.btn-primary href=build_list_path(@build_list)
|
|
||||||
= t('layout.cancel')
|
|
||||||
|
|
Loading…
Reference in New Issue