rails_async_migrations 1.0.4 → 1.0.5

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: 4253ed996632677655f41d68a099fa59f1140d8e6d45e5082ac67d5ae240fb52
4
- data.tar.gz: 4a7fe84133fe9a0e9361c0d47cef3fc48045a6031bf0f3a0cfcfc99e648fc12f
3
+ metadata.gz: c3631f04a30cfc01a7e695616190b5c9b2cf4af242b0f8fc6ae8eb04bf947e86
4
+ data.tar.gz: e60a2a45d1aecdfbd6af82760c94d7ccb55ebd4baf0c6ffeee6f8dca65b70632
5
5
  SHA512:
6
- metadata.gz: 76ae01899644674ef8f62a4718d263e261f0322d33617c85483dee36debfb5bdd209e58296080d77e8fef4c832994e0dc0cfa9990dc2ce7281cc87a827243dc0
7
- data.tar.gz: 94efe3c86bca71bcfb78c4630fed9fffbcaaa5b6d4258d1a46e29052dec5bd5f4468f56d13689a03bbe286ff254e8a81f4351f4282d7642a3af49c31b0f58608
6
+ metadata.gz: aab6691233585c732d12a3beea642e7529ee590e396086091f9a87edd7dd9daa824c84308b3f738691db285b9458e74052c50c7d41a62c708e3d982aad0be410
7
+ data.tar.gz: 268821ee21b8bccbfeb58a88e9b8bc565a480970fd40e0381fdcbb1988bc75e76110633195a6eff6a3145600793d15eac27a9ad3a9492419702f99830b9f23ec
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_async_migrations (1.0.4)
4
+ rails_async_migrations (1.0.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -91,17 +91,9 @@ RailsAsyncMigrations.config do |config|
91
91
  # :verbose can be used if you want a full log of the execution
92
92
  config.mode = :quiet
93
93
 
94
- # which kind of worker do you want to use for this library
94
+ # which adapter worker you want to use for this library
95
95
  # for now you have two options: :delayed_job or :sidekiq
96
96
  config.workers = :sidekiq
97
-
98
- # when the migration is turned asynchronous
99
- # it watches over some specific `ActiveRecord` methods
100
- # by adding them to this array, you'll lock and turn those methods asynchronous
101
- # by removing them you'll let them use the classical migration process
102
- # for example, if you set the `locked_methods` to %i[async] the migration will be processed normally
103
- # but the content of the `#async` method will be taken away and executed within the asynchronous queue
104
- config.locked_methods = %i[change up down]
105
97
  end
106
98
  ```
107
99
 
@@ -111,11 +103,14 @@ Each migration which is turned asynchronous follows each other, once one migrati
111
103
 
112
104
  If it fails, the error will be raised within the worker so it retries until it eventually works, or until it's considered dead. None of the further asynchronous migrations will be run until you fix the failed one, which is a good protection for data consistency.
113
105
 
106
+ ![RailsAsyncMigrations Schema](https://cdn-images-1.medium.com/max/1600/1*e1MElsR3B5rItwwVQkBYCw.png "RailsAsyncMigrations Schema")
107
+
108
+
114
109
  You can also manually launch the queue check and fire by using:
115
110
 
116
111
  $ rake rails_async_migrations:check_queue
117
112
 
118
- **For now, there is no rollback mechanism authorized, even if the source code is ready for it, it complexifies the build up logic and may not be needed in asynchronous cases.**
113
+ **For now, there is no rollback mechanism authorized. It means if you rollback the asynchronous migrations will be simply ignored. Handling multiple directions complexifies the build up logic and may not be needed in asynchronous cases.**
119
114
 
120
115
  ## States
121
116
 
Binary file
Binary file
@@ -6,8 +6,8 @@ module RailsAsyncMigrations
6
6
 
7
7
  def initialize
8
8
  @locked_methods = %i[change up down]
9
- @mode = :quiet # verbose, quiet
10
- @workers = :sidekiq # delayed_job, sidekiq
9
+ @mode = :quiet # :verbose, :quiet
10
+ @workers = :delayed_job # :sidekiq
11
11
  end
12
12
  end
13
13
  end
@@ -7,7 +7,7 @@ module RailsAsyncMigrations
7
7
 
8
8
  def verbose(text)
9
9
  return unless verbose?
10
- puts text
10
+ puts "[VERBOSE] #{text}"
11
11
  end
12
12
 
13
13
  private
@@ -1,3 +1,3 @@
1
1
  module RailsAsyncMigrations
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_async_migrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent Schaffner
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-04 00:00:00.000000000 Z
11
+ date: 2019-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -138,6 +138,8 @@ files:
138
138
  - LICENSE.txt
139
139
  - README.md
140
140
  - Rakefile
141
+ - _resource/schema.png
142
+ - _resource/schema.sketch
141
143
  - bin/console
142
144
  - bin/setup
143
145
  - lib/generators/rails_async_migrations/install_generator.rb