maintenance_tasks 1.10.1 → 1.10.2

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: 89ca6938b40f972d96333415fdeb3ec433b4d14701731b5cfcffb81354bb5a4d
4
- data.tar.gz: 01c307846ba7d76f8553c6cb2b270e6773719e9276d147a97a6bd39220bd5459
3
+ metadata.gz: 8035a01cd9e715fec1b276b2f1c609266daeca88fa13d49ee1e2993370103f87
4
+ data.tar.gz: b6ec7e053b256aa725cd3c23f932fe35b480b2398667cdc2ba9e72b3059ca614
5
5
  SHA512:
6
- metadata.gz: fcf9d547baf0b48bb0b08654c4e5d7f91fb6ec27ad58e62a9a20c60e19a2a45512e56f225353ecc9be47144aaeea11f8b94afb8a1052cd6e456eba19f3672c1a
7
- data.tar.gz: b950bf5c74429db618e09e5849dac8649919a6df4c812a0252af755eae7b0f198bc9944d008740e8491116c2ef85549dfbc709f9db74f0b805a5360531d86961
6
+ metadata.gz: 49aa01470360b4cde07fe1ce1d6a47158924fe0acca500ca21237374244c23a63560f4ea3fa03ec3f0dfae1ae8bb211817999b79c3057f1486f1c46ac75faab6
7
+ data.tar.gz: 85ac09e52d9396e83254fd1f0451e6627542a7fed4238397960b14b4c14112f71dc7f51600a8f650331bc9f74192e98e962537bb472021903e5a7fd93dfcec02
@@ -33,7 +33,8 @@ module MaintenanceTasks
33
33
  #
34
34
  # @return [Integer] the approximate number of batches to process.
35
35
  def count(task)
36
- (task.csv_content.count("\n") + @batch_size - 1) / @batch_size
36
+ count = task.csv_content.count("\n") - 1
37
+ (count + @batch_size - 1) / @batch_size
37
38
  end
38
39
  end
39
40
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ChangeRunsTickColumnsToBigints < ActiveRecord::Migration[6.0]
4
+ def up
5
+ change_table(:maintenance_tasks_runs, bulk: true) do |t|
6
+ t.change(:tick_count, :bigint)
7
+ t.change(:tick_total, :bigint)
8
+ end
9
+ end
10
+
11
+ def down
12
+ change_table(:maintenance_tasks_runs, bulk: true) do |t|
13
+ t.change(:tick_count, :integer)
14
+ t.change(:tick_total, :integer)
15
+ end
16
+ end
17
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maintenance_tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.1
4
+ version: 1.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify Engineering
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-09 00:00:00.000000000 Z
11
+ date: 2022-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -133,6 +133,7 @@ files:
133
133
  - db/migrate/20210225152418_remove_index_on_task_name.rb
134
134
  - db/migrate/20210517131953_add_arguments_to_maintenance_tasks_runs.rb
135
135
  - db/migrate/20211210152329_add_lock_version_to_maintenance_tasks_runs.rb
136
+ - db/migrate/20220706101937_change_runs_tick_columns_to_bigints.rb
136
137
  - exe/maintenance_tasks
137
138
  - lib/generators/maintenance_tasks/install_generator.rb
138
139
  - lib/generators/maintenance_tasks/task_generator.rb
@@ -151,7 +152,7 @@ homepage: https://github.com/Shopify/maintenance_tasks
151
152
  licenses:
152
153
  - MIT
153
154
  metadata:
154
- source_code_uri: https://github.com/Shopify/maintenance_tasks/tree/v1.10.1
155
+ source_code_uri: https://github.com/Shopify/maintenance_tasks/tree/v1.10.2
155
156
  allowed_push_host: https://rubygems.org
156
157
  post_install_message:
157
158
  rdoc_options: []
@@ -168,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
169
  - !ruby/object:Gem::Version
169
170
  version: '0'
170
171
  requirements: []
171
- rubygems_version: 3.2.20
172
+ rubygems_version: 3.3.3
172
173
  signing_key:
173
174
  specification_version: 4
174
175
  summary: A Rails engine for queuing and managing maintenance tasks