active_record_api-request 0.3.5 → 0.3.6
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ec6db51deb4bbce9665e99e40b21a72720c29f3508e39ce945518f8b0ed5bad3
|
|
4
|
+
data.tar.gz: 2c2add015ee0865b360ebce7c45dfa9e06b7225cf39a85be05464d4148601379
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b2176d2c4964be039374fa73155e13453258a2f128d7423ad2721d848d992a3b79f7551bdbd49b674a184bf288569804e8f471970969817a35eafb5ef14c82e7
|
|
7
|
+
data.tar.gz: 4795aff92c17edb1104b33b8db999b7895809ce94f6ce09c1d6b2fffa4f38f64c859c587bc65edfac10790afba2318e8327613eaed410d08d99e2f8161035f23
|
|
@@ -7,6 +7,8 @@ module ActiveRecordApi
|
|
|
7
7
|
|
|
8
8
|
def flush
|
|
9
9
|
return unless defined? AUTH_REDIS_POOL
|
|
10
|
+
debug_log 'flushing token cache'
|
|
11
|
+
Honeybadger.notify(StandardError.new('token cache has been flushed'))
|
|
10
12
|
AUTH_REDIS_POOL.with do |client|
|
|
11
13
|
@redis_client = client
|
|
12
14
|
@redis_client.del('auth_token')
|
|
@@ -20,7 +22,11 @@ module ActiveRecordApi
|
|
|
20
22
|
|
|
21
23
|
def retrieve_token_from_redis(token_proc)
|
|
22
24
|
debug_log 'looking?'
|
|
23
|
-
|
|
25
|
+
unless defined? AUTH_REDIS_POOL
|
|
26
|
+
debug_log 'no auth redis pool'
|
|
27
|
+
Honeybadger.notify(StandardError.new('no auth redis pool for token cache'))
|
|
28
|
+
return token_proc.call()
|
|
29
|
+
end
|
|
24
30
|
debug_log 'looking for token in cache'
|
|
25
31
|
AUTH_REDIS_POOL.with do |client|
|
|
26
32
|
@redis_client = client
|
|
@@ -35,6 +41,7 @@ module ActiveRecordApi
|
|
|
35
41
|
if acquire_lock
|
|
36
42
|
begin
|
|
37
43
|
debug_log "acquired lock"
|
|
44
|
+
Honeybadger.notify(StandardError.new('acquired lock and fetching token for cache'))
|
|
38
45
|
@token = token_proc.call()
|
|
39
46
|
@redis_client.set 'auth_token', @token
|
|
40
47
|
ensure
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_record_api-request
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Full Measure Education
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-05-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: active_attr
|