tapsoob 0.5.5 → 0.5.10

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: 2d2ae55167cb75761e58521b0949e1aa580e3f68f74f89de39922a0d8fd6a772
4
- data.tar.gz: c74c5c77da207e769a96c5fee90d6a42aac2a121546dfd371030dd786c3442d6
3
+ metadata.gz: c4f6bba051edfb49552f8f9e8612ca25f55570b9065546941e534462caac0673
4
+ data.tar.gz: 28750edabd5e25d66ce1498f8e1fa3c32079affabc8d857cf043489566faa268
5
5
  SHA512:
6
- metadata.gz: 65342221b6d64f8e20df8cc67996173f37a7be0859f3fe4d4bfa4a2688fd016852518a233aa4bd3249fa5a725c77687f8816c743962ddf13de53a0ca498ec92a
7
- data.tar.gz: 778bf22700739743ebdb80067c673d4c4ca5f545314bab61c1c8a7a88b8c60d7ecda90876e893f43e5d7f45adf410c524dff85365f7fa0079dd1f48b83d19b7b
6
+ metadata.gz: c91aeb288d41875ae9d2a43361fd4d31938c0d80d087320499948825a9cfd7818b25a6656d5aab9ce995786dbd75a124ddb49eaa6c125905bcef936f829d886a
7
+ data.tar.gz: 912725aa7e52cd41812260704a9fb91b543e1ff4b77ea904c784f1497a227f8914c10404132d30c5339d220b01369e9ea6f5000ce3126adab02c8059e24c3591
@@ -72,7 +72,7 @@ module Tapsoob
72
72
  # keep a record of the average chunksize within the first few hundred thousand records, after chunksize
73
73
  # goes below 100 or maybe if offset is > 1000
74
74
  def fetch_rows
75
- state[:chunksize] = fetch_chunksize
75
+ #state[:chunksize] = fetch_chunksize
76
76
  ds = table.order(*order_by).limit(state[:chunksize], state[:offset])
77
77
  state[:size] = table.count
78
78
  log.debug "DataStream#fetch_rows SQL -> #{ds.sql}"
@@ -86,7 +86,7 @@ module Tapsoob
86
86
  end
87
87
 
88
88
  def fetch_file(dump_path)
89
- state[:chunksize] = fetch_chunksize
89
+ #state[:chunksize] = fetch_chunksize
90
90
  ds = JSON.parse(File.read(File.join(dump_path, "data", "#{table_name}.json")))
91
91
  state[:size] = ds["data"].size
92
92
  log.debug "DataStream#fetch_file"
@@ -104,13 +104,13 @@ module Tapsoob
104
104
  20
105
105
  end
106
106
 
107
- def fetch_chunksize
108
- chunksize = state[:chunksize]
109
- return chunksize if state[:num_chunksize] < max_chunksize_training
110
- return chunksize if state[:avg_chunksize] == 0
111
- return chunksize if state[:error]
112
- state[:avg_chunksize] > chunksize ? state[:avg_chunksize] : chunksize
113
- end
107
+ #def fetch_chunksize
108
+ # chunksize = state[:chunksize]
109
+ # return chunksize if state[:num_chunksize] < max_chunksize_training
110
+ # return chunksize if state[:avg_chunksize] == 0
111
+ # return chunksize if state[:error]
112
+ # state[:avg_chunksize] > chunksize ? state[:avg_chunksize] : chunksize
113
+ #end
114
114
 
115
115
  def update_chunksize_stats
116
116
  return if state[:num_chunksize] >= max_chunksize_training
@@ -15,13 +15,13 @@ module Tapsoob
15
15
  template = ERB.new <<-END_MIG
16
16
  Class.new(Sequel::Migration) do
17
17
  def up
18
- <% db.tables.each do |table| %>
18
+ <% db.send(:sort_dumped_tables, db.tables, {}).each do |table| %>
19
19
  <%= db.dump_table_schema(table, indexes: false) %>
20
20
  <% end %>
21
21
  end
22
22
 
23
23
  def down
24
- <% db.tables.each do |table| %>
24
+ <% db.send(:sort_dumped_tables, db.tables, {}).reverse.each do |table| %>
25
25
  drop_table("<%= table %>", if_exists: true)
26
26
  <% end %>
27
27
  end
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Tapsoob
3
- VERSION = "0.5.5".freeze
3
+ VERSION = "0.5.10".freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tapsoob
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Félix Bellanger
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-04-20 00:00:00.000000000 Z
12
+ date: 2022-04-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ripl