bump inst-jobs
Change-Id: I1b49f421a6f08b507c6152174cda004f6da76d57 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274869 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Jacob Burroughs <jburroughs@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
6e99966a79
commit
533c3387a9
|
@ -24,7 +24,7 @@ if CANVAS_RAILS6_0
|
|||
gem 'tzinfo', '1.2.7'
|
||||
gem 'switchman', '2.2.1'
|
||||
gem 'guardrail', '2.0.1'
|
||||
gem 'switchman-inst-jobs', '3.2.2'
|
||||
gem 'switchman-inst-jobs', '3.2.4'
|
||||
else
|
||||
gem 'rails', '6.1.4.1'
|
||||
gem 'tzinfo', '2.0.4'
|
||||
|
@ -39,7 +39,7 @@ gem 'academic_benchmarks', '1.1.1', require: false
|
|||
gem 'active_model-better_errors', '1.6.7', require: 'active_model/better_errors'
|
||||
gem 'active_model_serializers', '0.9.0alpha1',
|
||||
github: 'rails-api/active_model_serializers', ref: '61882e1e4127facfe92e49057aec71edbe981829'
|
||||
gem 'activerecord-pg-extensions', '0.3.0'
|
||||
gem 'activerecord-pg-extensions', '0.4.2'
|
||||
gem 'addressable', '2.7.0', require: false
|
||||
gem 'after_transaction_commit', '2.2.2'
|
||||
gem 'authlogic', '6.4.1'
|
||||
|
@ -85,12 +85,12 @@ gem 'inst_statsd', '2.2.0'
|
|||
gem 'statsd-ruby', '1.4.0', require: false
|
||||
gem 'aroi', '0.0.7', require: false
|
||||
gem 'dogstatsd-ruby', '4.8.2'
|
||||
gem 'inst-jobs', '2.4.10'
|
||||
gem 'inst-jobs', '3.0.0'
|
||||
gem 'fugit', '1.4.0', require: false
|
||||
gem 'et-orbi', '1.2.4', require: false
|
||||
gem 'inst-jobs-autoscaling', '2.1.0'
|
||||
gem 'inst-jobs-autoscaling', '2.1.1'
|
||||
gem 'aws-sdk-autoscaling', '1.49.0', require: false
|
||||
gem 'inst-jobs-statsd', '2.1.0'
|
||||
gem 'inst-jobs-statsd', '2.1.2'
|
||||
# if updating json gem it will need to be hotfixed because if a newer version of
|
||||
# the json gem is installed, it will always use that one even before bundler
|
||||
# gets activated. Updating the gem in it's own commit will make this easier.
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (C) 2021 - present Instructure, Inc.
|
||||
#
|
||||
# This file is part of Canvas.
|
||||
#
|
||||
# Canvas is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU Affero General Public License as published by the Free
|
||||
# Software Foundation, version 3 of the License.
|
||||
#
|
||||
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# rubocop:disable Rails/SquishedSQLHeredocs
|
||||
class UpdateConflictingSingletonFunctionToUseIndex < ActiveRecord::Migration[5.2]
|
||||
tag :predeploy
|
||||
|
||||
def up
|
||||
execute(<<~SQL)
|
||||
CREATE OR REPLACE FUNCTION #{connection.quote_table_name('delayed_jobs_before_unlock_delete_conflicting_singletons_row_fn')} () RETURNS trigger AS $$
|
||||
BEGIN
|
||||
DELETE FROM delayed_jobs WHERE id<>OLD.id AND singleton=OLD.singleton AND locked_by IS NULL;
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql SET search_path TO #{::Switchman::Shard.current.name};
|
||||
SQL
|
||||
end
|
||||
|
||||
def down
|
||||
execute(<<~SQL)
|
||||
CREATE OR REPLACE FUNCTION #{connection.quote_table_name('delayed_jobs_before_unlock_delete_conflicting_singletons_row_fn')} () RETURNS trigger AS $$
|
||||
BEGIN
|
||||
IF EXISTS (SELECT 1 FROM delayed_jobs j2 WHERE j2.singleton=OLD.singleton) THEN
|
||||
DELETE FROM delayed_jobs WHERE id<>OLD.id AND singleton=OLD.singleton;
|
||||
END IF;
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql SET search_path TO #{::Switchman::Shard.current.name};
|
||||
SQL
|
||||
end
|
||||
end
|
||||
# rubocop:enable Rails/SquishedSQLHeredocs
|
|
@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|||
spec.license = 'AGPL'
|
||||
|
||||
spec.add_dependency 'activerecord', '>= 3.2'
|
||||
spec.add_dependency 'activerecord-pg-extensions', '>= 0.3.0'
|
||||
spec.add_dependency 'activerecord-pg-extensions', '~> 0.4'
|
||||
spec.add_dependency 'pg', '>= 0.17', '< 2.0'
|
||||
|
||||
spec.add_development_dependency 'bundler', '~> 2.2'
|
||||
|
|
|
@ -291,7 +291,7 @@ module Lti
|
|||
# it in the launch as "truncated"
|
||||
results = results.first(limit) << 'truncated' if results.length > limit
|
||||
results.join(',')
|
||||
rescue ActiveRecord::QueryTimeout
|
||||
rescue ActiveRecord::QueryCanceled
|
||||
"timed out"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue