canvas_sync 0.17.0.beta4 → 0.17.0.beta5

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: e2fac17ba7660bf59726320af878f6ca00b1d3dba48428677ee01dcaffdf210f
4
- data.tar.gz: 05161fb24879704d5d68b7ae45a4a69c848db6c914666a307641de24081e0234
3
+ metadata.gz: eba7624a65721ad2183b188372b167c47bde879c37c595ef13398e4ec4b835b5
4
+ data.tar.gz: a69c72c000c782bff566016ca1cc7813c0c1d6829f2516291721672e3ee7d5ec
5
5
  SHA512:
6
- metadata.gz: d1dbd39ffb4f0a58b90ecf9a36e493d360a88438aa93e7a40429e6a7f0004149c3e77a8da069c72df27f38d4657f769a5f6c309e4230a89db4d810d3afcac9f7
7
- data.tar.gz: c4ae094ca61c7698aa95ab2378433ba1f84e1481ef6034fcce129e188c8fa309692cbc4e9a1c7607d38e77f292aad9128d59c5f115258c7f22c5b9d6b0cadd75
6
+ metadata.gz: 00e85f161794e1526cf734aabaaf364b55b92b93a832248bd8f17b4eeb97081e20fc8ef7e84ae7029dbd654ad46410939d10ec4db5ba79394b9326de49948342
7
+ data.tar.gz: d30bb87abb822cd0f5ad10b60b6941326ac8a2e964241fa6e8403c5a5bf303e3d6945bd79ff500a181bd21a6805161281f4fe05fdd091f42b295ebf820772362
@@ -120,6 +120,8 @@ module CanvasSync
120
120
 
121
121
  @ready_to_queue = []
122
122
 
123
+ Batch.logger.debug("Beginning Batch #{@bidkey}")
124
+
123
125
  begin
124
126
  parent = Thread.current[:batch]
125
127
  Thread.current[:batch] = self
@@ -145,11 +145,6 @@ module CanvasSync
145
145
  end
146
146
  end
147
147
  end
148
-
149
- def cleanup_redis bid, callback_bid=nil
150
- Batch.cleanup_redis bid
151
- Batch.cleanup_redis callback_bid if callback_bid
152
- end
153
148
  end
154
149
  end
155
150
  end
@@ -106,7 +106,7 @@ module CanvasSync
106
106
 
107
107
  # Legacy Support
108
108
  def merge_options(job, options)
109
- matching_jobs = find_matching_jobs(sub_type)
109
+ matching_jobs = find_matching_jobs(job)
110
110
 
111
111
  matching_jobs.each do |j|
112
112
  j[:options] ||= {}
@@ -5,6 +5,7 @@ module CanvasSync
5
5
  class ConcurrentBatchJob < BaseJob
6
6
  def perform(sub_jobs, context: nil)
7
7
  Batch.new.tap do |b|
8
+ b.description = "Concurrent Batch Root"
8
9
  b.context = context
9
10
  b.jobs do
10
11
  sub_jobs.each do |j|
@@ -21,6 +21,7 @@ module CanvasSync
21
21
  end
22
22
  end
23
23
 
24
+ root_batch.description = "Serial Batch Root (#{serial_id})"
24
25
  root_batch.allow_context_changes = true
25
26
  root_batch.context = context
26
27
  root_batch.on(:success, "#{self.class.to_s}.cleanup_redis", serial_batch_id: serial_id)
@@ -61,7 +62,8 @@ module CanvasSync
61
62
 
62
63
  Batch.new(root_bid).jobs do
63
64
  Batch.new.tap do |batch|
64
- batch.on(:success, "#{self.to_s}.job_succeeded_callback", serial_batch_id: serial_id)
65
+ batch.description = "Serial Batch Fiber (#{serial_id})"
66
+ batch.on(:success, "#{self.to_s}.job_succeeded_callback", serial_batch_id: serial_id)
65
67
  batch.jobs do
66
68
  ChainBuilder.enqueue_job(next_job)
67
69
  end
@@ -1,3 +1,3 @@
1
1
  module CanvasSync
2
- VERSION = "0.17.0.beta4".freeze
2
+ VERSION = "0.17.0.beta5".freeze
3
3
  end
@@ -2,19 +2,16 @@ require 'spec_helper'
2
2
 
3
3
  class WorkerA < BatchTestJobBase
4
4
  def perform
5
- puts 'A'
6
5
  end
7
6
  end
8
7
 
9
8
  class WorkerB < BatchTestJobBase
10
9
  def perform
11
- puts 'B'
12
10
  end
13
11
  end
14
12
 
15
13
  class WorkerC < BatchTestJobBase
16
14
  def perform
17
- puts 'C'
18
15
  end
19
16
  end
20
17
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0.beta4
4
+ version: 0.17.0.beta5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Collings
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-27 00:00:00.000000000 Z
11
+ date: 2020-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler