ruote-ar 0.0.8 → 0.0.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.
- checksums.yaml +4 -4
- data/lib/ruote/ar/storage.rb +1 -19
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b9bfedcc50fc34bee0fe0491b2c546c2a4237518
|
|
4
|
+
data.tar.gz: bc596610aa5f58a2e43a2f04aa915cf38fe591bf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf3d7d7ca79b690fe392639d4cce9dde1446d8ed840d8e266a14594fadf2b562a513136c68719c572c17536710d9381409dd85e775a11f8748114be221218c64
|
|
7
|
+
data.tar.gz: 3790c94557bde527d52daebbd58eca50316821d56896195bb8644fbf593143902a4b285066d7deacdd1437cdd34055cf0b4dc28f63912f7205113c809c738a53
|
data/lib/ruote/ar/storage.rb
CHANGED
|
@@ -32,9 +32,6 @@ module Ruote
|
|
|
32
32
|
|
|
33
33
|
def begin_step
|
|
34
34
|
|
|
35
|
-
# release uncommited releases
|
|
36
|
-
connection.execute("ROLLBACK")
|
|
37
|
-
|
|
38
35
|
now = Time.now.utc
|
|
39
36
|
delta = now - @last_time
|
|
40
37
|
|
|
@@ -66,12 +63,7 @@ module Ruote
|
|
|
66
63
|
um.set [
|
|
67
64
|
[table[:worker], @worker]
|
|
68
65
|
]
|
|
69
|
-
|
|
70
|
-
begin_transaction
|
|
71
|
-
true
|
|
72
|
-
else
|
|
73
|
-
false
|
|
74
|
-
end
|
|
66
|
+
return connection.update(um.to_sql) > 0
|
|
75
67
|
end
|
|
76
68
|
|
|
77
69
|
|
|
@@ -82,8 +74,6 @@ module Ruote
|
|
|
82
74
|
dm.from table
|
|
83
75
|
dm.where table[:typ].eq(doc['type']).and(table[:ide].eq(doc['_id']).and(table[:rev].eq(1).and(table[:worker].eq(@worker))))
|
|
84
76
|
connection.delete(dm)
|
|
85
|
-
|
|
86
|
-
commit
|
|
87
77
|
end
|
|
88
78
|
|
|
89
79
|
def put_schedule(flavour, owner_fei, s, msg)
|
|
@@ -369,14 +359,6 @@ module Ruote
|
|
|
369
359
|
end || "worker"
|
|
370
360
|
end
|
|
371
361
|
|
|
372
|
-
def begin_transaction
|
|
373
|
-
connection.execute("BEGIN")
|
|
374
|
-
end
|
|
375
|
-
|
|
376
|
-
def commit
|
|
377
|
-
connection.execute("COMMIT")
|
|
378
|
-
end
|
|
379
|
-
|
|
380
362
|
end
|
|
381
363
|
end
|
|
382
364
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruote-ar
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- pedroteixeira
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-07-
|
|
12
|
+
date: 2014-07-11 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|