canvas_sync 0.18.10 → 0.18.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 911b4fffbc2c21c25f32b45c0c90419dddcef40497b63c5d5757ec0e12544e36
4
- data.tar.gz: 90377a8facd25b77726ab82754a50c7aa3a9851c1012801496e19d6258ea7275
3
+ metadata.gz: 1223506dbbaaa180f70770aaabd92c3ffe931ae491bd392b2bbaa2ce520de2c8
4
+ data.tar.gz: b0b5bc307fe639c3281f51658e995e2fc661186cd5b73918027e0fe01f7487e6
5
5
  SHA512:
6
- metadata.gz: 5186a70509b324acdd5e8a8e023fdfb9503b7e899894938944632759eeb0bf362cd467f30700f3d8ba02a0ee06476c7646b83acf34ea3eeae5d0375a518d1096
7
- data.tar.gz: 11812e324c87f8055baaade4a36a822b090b66c95691521a32eb89855c51ceddeaee417f87aae9f5b5c5401c1fe3a6433d102b4a5d9948f5278835ce71f8530d
6
+ metadata.gz: 40d9c62d733a904611600f4fe6d37e0eecf956d835fb0db31d10e40af8d0bed2269a72b386ae9135a2b8dc05219df80002497cf19ab88d6e579be81d80180c42
7
+ data.tar.gz: 659c99a14af5f186b3df3522642fec00b6ce7e3337a01e23e11f8c261208065834b9754d6d619b7445209dd2ed8a0eddbaabdc257a90038399a00de48eae88a1
@@ -376,6 +376,7 @@ module CanvasSync
376
376
  "BID-#{bid}-callbacks-complete",
377
377
  "BID-#{bid}-callbacks-success",
378
378
  "BID-#{bid}-failed",
379
+ "BID-#{bid}-dead",
379
380
 
380
381
  "BID-#{bid}-batches-success",
381
382
  "BID-#{bid}-batches-complete",
@@ -1,6 +1,7 @@
1
1
 
2
2
  @color-green: #25c766;
3
- @color-red: #c7254e;
3
+ @color-darkred: #8f0000;
4
+ @color-red: #e03963;
4
5
  @color-yellow: #c4c725;
5
6
 
6
7
  .code-wrap.batch-context .args-extended {
@@ -30,6 +31,9 @@
30
31
  &.failed {
31
32
  color: @color-red;
32
33
  }
34
+ &.dead {
35
+ color: @color-darkred;
36
+ }
33
37
  &.success {
34
38
  color: @color-green;
35
39
  }
@@ -156,7 +160,7 @@
156
160
  }
157
161
 
158
162
  .status-block {
159
- width: 10em;
163
+ width: 12em;
160
164
  text-align: center;
161
165
  }
162
166
  }
@@ -12,6 +12,8 @@ const StatusBlock = (props) => html`
12
12
  |
13
13
  <span class="tree-stat failed">${props.failed_count}</span>
14
14
  |
15
+ <span class="tree-stat dead">${props.dead_count}</span>
16
+ |
15
17
  <span class="tree-stat success">${props.successful_count}</span>
16
18
  /
17
19
  <span class="tree-stat total">${props.total_count}</span>
@@ -96,7 +98,7 @@ class TreeRoot extends Component {
96
98
  const tree_data = JSON.parse(document.querySelector('#batch-tree #initial-data').innerHTML);
97
99
  return html`
98
100
  <div class="tree-header">
99
- <${StatusBlock} pending_count="pending" failed_count="failed" successful_count="successful" total_count="total" />
101
+ <${StatusBlock} pending_count="pending" failed_count="failed" dead_count="dead" successful_count="successful" total_count="total" />
100
102
  </div>
101
103
  <${TreeLevel} data=${tree_data} />
102
104
  `;
@@ -5,12 +5,13 @@
5
5
  <th rowspan="2"><%= t('BID') %></th>
6
6
  <th rowspan="2"><%= t('Description') %></th>
7
7
 
8
- <th colspan="4"><%= t('Jobs') %></th>
8
+ <th colspan="5"><%= t('Jobs') %></th>
9
9
  <th colspan="4"><%= t('Sub-Batches') %></th>
10
10
  </tr>
11
11
  <tr>
12
12
  <th><%= t('Pending') %></th>
13
13
  <th><%= t('Failed') %></th>
14
+ <th><%= t('Dead') %></th>
14
15
  <th><%= t('Complete') %></th>
15
16
  <th><%= t('Total') %></th>
16
17
 
@@ -30,6 +31,7 @@
30
31
 
31
32
  <td><%= status.pending %></th>
32
33
  <td><%= status.failures %></th>
34
+ <td><%= status.dead %></th>
33
35
  <td><%= status.completed_count %></th>
34
36
  <td><%= status.job_count %></th>
35
37
 
@@ -68,6 +68,7 @@ module CanvasSync::JobBatches::Sidekiq
68
68
  jobs_total = r.hget("BID-#{bid}", "job_count").to_i
69
69
  jobs_pending = r.hget("BID-#{bid}", 'pending').to_i
70
70
  jobs_failed = r.scard("BID-#{bid}-failed").to_i
71
+ jobs_dead = r.scard("BID-#{bid}-dead").to_i
71
72
  jobs_success = jobs_total - jobs_pending
72
73
 
73
74
  batches_total = r.hget("BID-#{bid}", 'children').to_i
@@ -90,6 +91,7 @@ module CanvasSync::JobBatches::Sidekiq
90
91
  pending_count: jobs_pending,
91
92
  successful_count: jobs_success,
92
93
  failed_count: jobs_failed,
94
+ dead_count: jobs_dead,
93
95
  total_count: jobs_total,
94
96
  # items: batches.map{|b| layer_data[b] },
95
97
  },
@@ -21,6 +21,10 @@ module CanvasSync
21
21
  Batch.redis { |r| r.scard("BID-#{bid}-failed") }.to_i
22
22
  end
23
23
 
24
+ def dead
25
+ Batch.redis { |r| r.scard("BID-#{bid}-dead") }.to_i
26
+ end
27
+
24
28
  def completed_count
25
29
  job_count - pending
26
30
  end
@@ -1,3 +1,3 @@
1
1
  module CanvasSync
2
- VERSION = "0.18.10".freeze
2
+ VERSION = "0.18.12".freeze
3
3
  end
data/lib/canvas_sync.rb CHANGED
@@ -206,7 +206,7 @@ module CanvasSync
206
206
  )
207
207
 
208
208
  # Skip syncing terms if not required
209
- unless current_chain.empty? || (models & ['terms']).present?
209
+ if !current_chain.empty? || (models & ['terms']).present?
210
210
  term_parent_chain << per_term_chain
211
211
  end
212
212
 
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.18.10
4
+ version: 0.18.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure CustomDev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-06 00:00:00.000000000 Z
11
+ date: 2023-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails