canvas_sync 0.22.0.beta4 → 0.22.0.beta6
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/canvas_sync/job_uniqueness/strategy/base.rb +7 -3
- data/lib/canvas_sync/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: 125eb3db0c41f8fe1f4555b8346e6c90342bbe1f3c3fe6e2f5c664040f1c4fe7
|
4
|
+
data.tar.gz: 4651404b9891212888ed31d38dee17090be15b108950b2e4631da6083a0dd5c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f52b68c339cf00addfefe062b62b3e6fc2b7ec691ecb8a82ed3be14020a5988a89f57d207f35a7fa4c4a566771650cbbff4d063e08686082b8633625f4596869
|
7
|
+
data.tar.gz: 114247208144ff9999ccfedb0aa44363212bf6648f22f8ed728f9462efda03a5620e209f9011105b7ef2adedbacb687a9491aae4850cde52527679cf29a7b46a
|
@@ -62,7 +62,7 @@ module CanvasSync::JobUniqueness
|
|
62
62
|
})
|
63
63
|
end
|
64
64
|
|
65
|
-
CanvasSync.logger.debug("Wrapped job in Locking Batch #{batch.bid} for #{key}")
|
65
|
+
CanvasSync::JobUniqueness.logger.debug("Wrapped job in Locking Batch #{batch.bid} for #{key}")
|
66
66
|
|
67
67
|
batch.jobs do
|
68
68
|
return blk.call
|
@@ -70,9 +70,11 @@ module CanvasSync::JobUniqueness
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def self.internal_batch_callback(batch_status, opts)
|
73
|
-
CanvasSync.logger.debug("Received Batch(#{batch_status.bid}) callback for #{opts[:lock_strategy]}
|
73
|
+
CanvasSync::JobUniqueness.logger.debug("Received Batch(#{batch_status.bid}) callback for #{opts[:lock_strategy]} #{opts[:lock_key]} - #{opts[:event]}")
|
74
|
+
CanvasSync::JobUniqueness.logger.debug("Context data: #{opts[:lock_context]}")
|
74
75
|
strategy_class = opts[:lock_strategy].constantize
|
75
76
|
lock_context = LockContext.from_serialized(opts[:lock_context])
|
77
|
+
CanvasSync::JobUniqueness.logger.debug("Rehydrated LockContext: #{lock_context.job_id} #{lock_context.debug_data}")
|
76
78
|
strategy = strategy_class.new(lock_context)
|
77
79
|
# TODO Should this route through LockContext#handle_lifecycle!?
|
78
80
|
strategy.batch_callback(opts[:event].to_sym, batch_status)
|
@@ -96,7 +98,9 @@ module CanvasSync::JobUniqueness
|
|
96
98
|
end
|
97
99
|
|
98
100
|
def unlock()
|
99
|
-
|
101
|
+
CanvasSync::JobUniqueness.logger.debug { "Trying to unlock #{key} - (#{result || 'Not Unlocked!'})" }
|
102
|
+
result = locksmith.unlock
|
103
|
+
CanvasSync::JobUniqueness.logger.debug { "Unlocked #{key} - (#{result || 'Not Unlocked!'})" }
|
100
104
|
end
|
101
105
|
|
102
106
|
def locksmith
|
data/lib/canvas_sync/version.rb
CHANGED