diff options
author | Regis <boudinot.regis@yahoo.com> | 2016-12-02 21:46:47 +0300 |
---|---|---|
committer | Regis <boudinot.regis@yahoo.com> | 2016-12-02 21:46:47 +0300 |
commit | 9d1fd16ab13229791d256266fca459390506c373 (patch) | |
tree | 9124411d85fef634523665bd08d05c6ae1d8514a /config | |
parent | 18b559c9be5cf903569f01ae878ed71415b8a1a8 (diff) | |
parent | 44dc4173306235dd6afdd50b685c69eb3087166b (diff) |
fix conflict
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/ar_monkey_patch.rb | 17 | ||||
-rw-r--r-- | config/initializers/sidekiq.rb | 2 | ||||
-rw-r--r-- | config/routes/project.rb | 1 |
3 files changed, 19 insertions, 1 deletions
diff --git a/config/initializers/ar_monkey_patch.rb b/config/initializers/ar_monkey_patch.rb index 0da584626ee..6979f4641b0 100644 --- a/config/initializers/ar_monkey_patch.rb +++ b/config/initializers/ar_monkey_patch.rb @@ -52,6 +52,23 @@ module ActiveRecord raise end end + + # This is patched because we need it to query `lock_version IS NULL` + # rather than `lock_version = 0` whenever lock_version is NULL. + def relation_for_destroy + return super unless locking_enabled? + + column_name = self.class.locking_column + super.where(self.class.arel_table[column_name].eq(self[column_name])) + end + end + + # This is patched because we want `lock_version` default to `NULL` + # rather than `0` + class LockingType < SimpleDelegator + def type_cast_from_database(value) + super + end end end end diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index b87b31d9697..1d7a3f03ace 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -61,5 +61,5 @@ begin end end end -rescue Redis::BaseError, SocketError +rescue Redis::BaseError, SocketError, Errno::ENOENT, Errno::EAFNOSUPPORT, Errno::ECONNRESET, Errno::ECONNREFUSED end diff --git a/config/routes/project.rb b/config/routes/project.rb index 1336484a399..0754f0ec3b0 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -129,6 +129,7 @@ constraints(ProjectUrlConstrainer.new) do member do post :cancel post :retry + get :builds end end |