pgbus 0.7.6 → 0.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/pgbus/active_job/executor.rb +11 -1
- data/lib/pgbus/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: af9ea5eec454c7ecd4ca32a368382851d96ff7790ef9eb0661877e98eac02a07
|
|
4
|
+
data.tar.gz: 9b8b0d754071dc641cacf3691340ef499da00f7485987538f4c67dacc7d8f1cc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 15058498b3ca28d3e882fa3e01358c55f7cdd78b3a17cdb02c59c047a7194565e157a3889fda99afadd1439cd50807fa1d19d6e07c6c24a61919406111d9592b
|
|
7
|
+
data.tar.gz: 7032ebd0693d0c6eb4276489587a57a16207f305b58f324c789da4e3c0bb9032b81fe9e1c1fcf5f1bac1d58fe50864a819c4ad896bc6d8fc06cc816c801a6ef3
|
|
@@ -107,12 +107,22 @@ module Pgbus
|
|
|
107
107
|
|
|
108
108
|
def execute_job(job)
|
|
109
109
|
if defined?(Rails) && Rails.respond_to?(:application) && Rails.application
|
|
110
|
-
Rails.application.
|
|
110
|
+
wrapper = reloading? ? Rails.application.reloader : Rails.application.executor
|
|
111
|
+
wrapper.wrap { job.perform_now }
|
|
111
112
|
else
|
|
112
113
|
job.perform_now
|
|
113
114
|
end
|
|
114
115
|
end
|
|
115
116
|
|
|
117
|
+
def reloading?
|
|
118
|
+
app_config = Rails.application.config
|
|
119
|
+
if app_config.respond_to?(:enable_reloading)
|
|
120
|
+
app_config.enable_reloading
|
|
121
|
+
else
|
|
122
|
+
!app_config.cache_classes
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
116
126
|
def monotonic_now
|
|
117
127
|
::Process.clock_gettime(::Process::CLOCK_MONOTONIC)
|
|
118
128
|
end
|
data/lib/pgbus/version.rb
CHANGED