From b66cea71f526c664c7602ad06c8aabbf16cfe4a3 Mon Sep 17 00:00:00 2001 From: Wedge Date: Thu, 9 Jun 2016 18:20:51 +0300 Subject: [PATCH] Comment a job out --- .../controllers/rosa_abf_controller.js | 18 ++++++++++-------- .../clear_builder_on_stale_build_lists_job.rb | 3 +-- config/schedule.yml | 12 ++++++------ 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/assets/javascripts/angularjs/controllers/rosa_abf_controller.js b/app/assets/javascripts/angularjs/controllers/rosa_abf_controller.js index 5e0bb2f51..140089dca 100644 --- a/app/assets/javascripts/angularjs/controllers/rosa_abf_controller.js +++ b/app/assets/javascripts/angularjs/controllers/rosa_abf_controller.js @@ -9,15 +9,17 @@ RosaABF.controller('RosaABFController', ['$scope', 'LocalesHelper', 'SoundNotifi $timeout(function() { $scope.hideAlerts = true; }, 5000); } - if(typeof $cookies.get('toggle') == 'undefined') { - var mobileView = 992; + var mobileView = 992, toggle; - if (window.innerWidth >= mobileView) { - $scope.toggle = true; - } - else { - $scope.toggle = false; - } + if (window.innerWidth >= mobileView) { + toggle = true; + } + else { + toggle = false; + } + + if(typeof $cookies.get('toggle') == 'undefined') { + $scope.toggle = toggle; } else { $scope.toggle = $cookies.get('toggle') == 'true' ? true : false; diff --git a/app/jobs/build_lists/clear_builder_on_stale_build_lists_job.rb b/app/jobs/build_lists/clear_builder_on_stale_build_lists_job.rb index 30b1f6f33..5dc819fb4 100644 --- a/app/jobs/build_lists/clear_builder_on_stale_build_lists_job.rb +++ b/app/jobs/build_lists/clear_builder_on_stale_build_lists_job.rb @@ -6,8 +6,7 @@ module BuildLists def perform_with_ar_connection BuildList.transaction do BuildList.where(["updated_at < ?", 120.seconds.ago]).where(status: BuildList::BUILD_PENDING).where.not(builder: nil).find_each(batch_size: 50) do |bl| - bl.builder = nil - bl.save + bl.update_column(builder_id: nil) end end end diff --git a/config/schedule.yml b/config/schedule.yml index b67c9ec6e..e093d6528 100644 --- a/config/schedule.yml +++ b/config/schedule.yml @@ -33,12 +33,12 @@ run_extra_mass_builds: queue: low description: 'Run mass builds with relations' -clear_builder_on_stale_buildlists: - every: - - '2m' - class: 'BuildLists::ClearBuilderOnStaleBuildListsJob' - queue: low - description: 'Clear builder on build lists which are still pending' +#clear_builder_on_stale_buildlists: +# every: +# - '2m' +# class: 'BuildLists::ClearBuilderOnStaleBuildListsJob' +# queue: low +# description: 'Clear builder on build lists which are still pending' remove_outdated_items: cron: '0 3 * * *'