Comment a job out

This commit is contained in:
Wedge 2016-06-09 18:20:51 +03:00
parent 841c0623a7
commit b66cea71f5
3 changed files with 17 additions and 16 deletions

View File

@ -9,15 +9,17 @@ RosaABF.controller('RosaABFController', ['$scope', 'LocalesHelper', 'SoundNotifi
$timeout(function() { $scope.hideAlerts = true; }, 5000); $timeout(function() { $scope.hideAlerts = true; }, 5000);
} }
if(typeof $cookies.get('toggle') == 'undefined') { var mobileView = 992, toggle;
var mobileView = 992;
if (window.innerWidth >= mobileView) { if (window.innerWidth >= mobileView) {
$scope.toggle = true; toggle = true;
} }
else { else {
$scope.toggle = false; toggle = false;
} }
if(typeof $cookies.get('toggle') == 'undefined') {
$scope.toggle = toggle;
} }
else { else {
$scope.toggle = $cookies.get('toggle') == 'true' ? true : false; $scope.toggle = $cookies.get('toggle') == 'true' ? true : false;

View File

@ -6,8 +6,7 @@ module BuildLists
def perform_with_ar_connection def perform_with_ar_connection
BuildList.transaction do 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| 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.update_column(builder_id: nil)
bl.save
end end
end end
end end

View File

@ -33,12 +33,12 @@ run_extra_mass_builds:
queue: low queue: low
description: 'Run mass builds with relations' description: 'Run mass builds with relations'
clear_builder_on_stale_buildlists: #clear_builder_on_stale_buildlists:
every: # every:
- '2m' # - '2m'
class: 'BuildLists::ClearBuilderOnStaleBuildListsJob' # class: 'BuildLists::ClearBuilderOnStaleBuildListsJob'
queue: low # queue: low
description: 'Clear builder on build lists which are still pending' # description: 'Clear builder on build lists which are still pending'
remove_outdated_items: remove_outdated_items:
cron: '0 3 * * *' cron: '0 3 * * *'