yam-db-charmer 1.7.4.8 → 1.7.4.9

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.
@@ -14,10 +14,11 @@ module DbCharmer
14
14
 
15
15
  # The block passed to this function should return an object responding to key_field
16
16
  def create_with_allocated_shard(key_field = :id, &block)
17
- group = sharded_connection.sharder.least_loaded_group
18
- shard_info = shard_info_by_group_id(group_id)
19
- conn = shard_connection_config(shard_info, group.id)
20
- key_obj = on_db(conn, proxy_target, &block)
17
+ sharder = sharded_connection.sharder
18
+ group = sharder.least_loaded_group
19
+ shard_info = sharder.shard_info_by_group_id(group.id)
20
+ conn = sharder.shard_connection_config(shard_info, group.id)
21
+ key_obj = on_db(conn, nil, &block)
21
22
  allocate_new_block_for_key_on_group(key_obj.send(key_field), group)
22
23
  key_obj
23
24
  end
@@ -3,7 +3,7 @@ module DbCharmer
3
3
  MAJOR = 1
4
4
  MINOR = 7
5
5
  PATCH = 4
6
- BUILD = 8
6
+ BUILD = 9
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yam-db-charmer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 103
4
+ hash: 101
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 7
9
9
  - 4
10
- - 8
11
- version: 1.7.4.8
10
+ - 9
11
+ version: 1.7.4.9
12
12
  platform: ruby
13
13
  authors:
14
14
  - Oleksiy Kovyrin