viewy 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/viewy/dependency_management/view_refresher.rb +7 -2
- data/lib/viewy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10ba4105cac09813ce262177ec5459640bbb46da
|
4
|
+
data.tar.gz: 910730e222b89864e39ea3ba474065e1b7c6dd6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f47a589a5e89e064361d57cae35f919b33ca3cdc3fc5e1e65da798a804a6fac07334f1414d64352a73498a874fba45890ad9bda5b61971627204684dad450029
|
7
|
+
data.tar.gz: 51e79f941b575721cc39f300517bfff4e7805b48aca4bb73252280c6ed5ba7c24aa4939f00285985c79377cb5b79848c9b2ccf024cc4f0c4e7cefe125a28f0fe
|
@@ -54,13 +54,18 @@ module Viewy
|
|
54
54
|
# @param ex [ActiveRecord::StatementInvalid] an exception raised during the view refresh
|
55
55
|
# @param concurrently [Boolean] whether or not the refresh that raised the exception was concurrent
|
56
56
|
#
|
57
|
-
# @raise [ActiveRecord::StatementInvalid] re-raised if the original exception
|
57
|
+
# @raise [ActiveRecord::StatementInvalid] re-raised if the original exception does not indicate the refresh
|
58
|
+
# should be retried non-concurrently
|
58
59
|
#
|
59
60
|
# @return [Boolean] true if the system should attempt to refresh the view non-concurrently after a concurrent
|
60
61
|
# refresh has failed. Since Postgres raises an error when an unpopulated view is refreshed concurrently, this
|
61
62
|
# allows the system to populated such views if needed
|
62
63
|
private def attempt_non_concurrent_refresh?(ex, concurrently)
|
63
|
-
|
64
|
+
original_exception = ex.original_exception
|
65
|
+
should_retry_non_concurrently = original_exception.instance_of?(PG::FeatureNotSupported) ||
|
66
|
+
original_exception.instance_of?(PG::ObjectNotInPrerequisiteState)
|
67
|
+
|
68
|
+
if should_retry_non_concurrently
|
64
69
|
concurrently
|
65
70
|
else
|
66
71
|
raise ex
|
data/lib/viewy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: viewy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emerson Huitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|