active_record_mutex 2.3.6 → 2.3.7
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 686d0cc0cb5deb244a9fe68ed6578c007a5d5a5c
|
4
|
+
data.tar.gz: 530e542da37141df4d92ba7488276e853c75034a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbc11293f1d454c08aa26e63dc6db721c2c4e84e9b1fe8422c23c4cd1aa285df1032ec0da9b6138d98e47bd9ea352ab6d01bcfa30784b36853afa2b0a3cbabb3
|
7
|
+
data.tar.gz: efed2a868ccb21f108f7444d13aca5f9d3ada747b7437d200ac82e50478344e6ecb886063f64e79914ddb5c998141b2926ce7236e6c3977c100dcbc5f9291bf9
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.7
|
data/active_record_mutex.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: active_record_mutex 2.3.
|
2
|
+
# stub: active_record_mutex 2.3.7 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "active_record_mutex"
|
6
|
-
s.version = "2.3.
|
6
|
+
s.version = "2.3.7"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib"]
|
10
10
|
s.authors = ["Florian Frank"]
|
11
|
-
s.date = "2016-
|
11
|
+
s.date = "2016-09-06"
|
12
12
|
s.description = "Mutex that can be used to synchronise ruby processes via an ActiveRecord datababase connection. (Only Mysql is supported at the moment.)"
|
13
13
|
s.email = "flori@ping.de"
|
14
14
|
s.extra_rdoc_files = ["README.md", "lib/active_record/database_mutex.rb", "lib/active_record/database_mutex/implementation.rb", "lib/active_record/database_mutex/version.rb", "lib/active_record/mutex.rb", "lib/active_record_mutex.rb"]
|
@@ -8,6 +8,8 @@ module ActiveRecord
|
|
8
8
|
# Creates a mutex with the name given with the option :name.
|
9
9
|
def initialize(opts = {})
|
10
10
|
@name = opts[:name] or raise ArgumentError, "mutex requires a :name argument"
|
11
|
+
query %{ SET @old_autocommit = @@autocommit }
|
12
|
+
query %{ SET autocommit = 1 }
|
11
13
|
query %{
|
12
14
|
CREATE TEMPORARY TABLE IF NOT EXISTS mutex_counters
|
13
15
|
(
|
@@ -16,6 +18,7 @@ module ActiveRecord
|
|
16
18
|
PRIMARY KEY (name(128))
|
17
19
|
) DEFAULT CHARSET=utf8mb4
|
18
20
|
}
|
21
|
+
query %{ SET autocommit = @old_autocommit }
|
19
22
|
end
|
20
23
|
|
21
24
|
def db
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_mutex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|