sliding_partition 0.1.0 → 0.2.0

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
  SHA1:
3
- metadata.gz: e31845f243303eb0ddb1cf2caaa1993c74a56390
4
- data.tar.gz: 0ac4e7ee1213d2f0392e5f1fcaba3196487bf5a5
3
+ metadata.gz: 0948c4bbd593077e67a7aa68618227a2562af3a7
4
+ data.tar.gz: 832bf4f49e5f6ca93def6ad92409d5e5737a30ca
5
5
  SHA512:
6
- metadata.gz: 14dc2a1107cad143eac55466130f65ef5ed38cb4ba75a80727ec6b56394fa63d244520a1ed5063d19324f4a2fd402e0b1cdae00ec21b9af5a35c88bda345f253
7
- data.tar.gz: ecc06d8eee4a939fd98c1ba396ae091252896a77745a92e55bcabad4dde188e1f4bc02a013308e10a366caa5d376fd4b00af2242accd9ba478238d8b91d73308
6
+ metadata.gz: e3481a35f725677ba571b00789b040e91faa328470ac49d29fc9b870a4310059016405782eecf2078dbdef6d06867c2e4689428d3eb799b907dad98b458c3c2a
7
+ data.tar.gz: 04750347eb8b6c466469ea1569c80e3fe1b115ad9b648bde3ce69023e2f7b632aab4c216453131082ee032b67ab239dcbe3b59b43e3ec72104e335eaebcf84e6
@@ -15,6 +15,10 @@ module SlidingPartition
15
15
  parititions.values.each { |p| p.setup! }
16
16
  end
17
17
 
18
+ def self.rotate!
19
+ parititions.values.each { |p| p.rotate! }
20
+ end
21
+
18
22
  def self.migrate!
19
23
  parititions.values.each { |p| p.migrate! }
20
24
  end
@@ -12,7 +12,7 @@ module SlidingPartition
12
12
  end
13
13
 
14
14
  def self.version
15
- "0.1.0"
15
+ "0.2.0"
16
16
  end
17
17
 
18
18
  def self.version_label
@@ -0,0 +1,10 @@
1
+
2
+ module SlidingPartition
3
+ class Job < ::ApplicationJob
4
+
5
+ def perform
6
+ SlidingPartition.rotate!
7
+ end
8
+
9
+ end
10
+ end
@@ -5,6 +5,10 @@ module SlidingPartition
5
5
  rake_tasks do
6
6
  load "tasks/sliding_partition_tasks.rake"
7
7
  end
8
+
9
+ initializer "sliding_partition.load_jobs" do |app|
10
+ require "sliding_partition/job" if defined?(ActiveJob)
11
+ end
8
12
  end
9
13
  end
10
14
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sliding_partition
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Sadauskas
@@ -254,6 +254,7 @@ files:
254
254
  - lib/sliding_partition.rb
255
255
  - lib/sliding_partition/definition.rb
256
256
  - lib/sliding_partition/identity.rb
257
+ - lib/sliding_partition/job.rb
257
258
  - lib/sliding_partition/partition_ddl_changer.rb
258
259
  - lib/sliding_partition/partition_table.rb
259
260
  - lib/sliding_partition/railtie.rb