gurgitate-mail 1.10.2 → 1.10.3
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.
- data/lib/gurgitate/deliver/mh.rb +13 -3
- metadata +2 -2
data/lib/gurgitate/deliver/mh.rb
CHANGED
@@ -62,7 +62,8 @@ module Gurgitate
|
|
62
62
|
def update_sequences mailbox, msgnum
|
63
63
|
sequences = File.join(mailbox, ".mh_sequences")
|
64
64
|
lockfile = sequences + ".lock" # how quaint
|
65
|
-
|
65
|
+
counter=0
|
66
|
+
while counter < 10 do
|
66
67
|
begin
|
67
68
|
File.open(lockfile,
|
68
69
|
File::WRONLY |
|
@@ -86,14 +87,23 @@ module Gurgitate
|
|
86
87
|
end
|
87
88
|
end
|
88
89
|
|
89
|
-
File.unlink
|
90
|
+
File.unlink lockfile
|
90
91
|
break
|
91
92
|
rescue Errno::EEXIST
|
92
93
|
# some other process is doing something, so wait a few
|
93
94
|
# milliseconds until it's done
|
94
|
-
|
95
|
+
counter += 1
|
96
|
+
sleep(0.1)
|
95
97
|
end
|
96
98
|
end
|
99
|
+
|
100
|
+
# If it's still around after 10 tries, then obviously
|
101
|
+
# something bigger went wrong; forcibly remove it and
|
102
|
+
# try again.
|
103
|
+
if counter == 10 then
|
104
|
+
File.unlink lockfile
|
105
|
+
update_sequences mailbox, msgnum
|
106
|
+
end
|
97
107
|
end
|
98
108
|
|
99
109
|
def update_unseen unseen, msgnum
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gurgitate-mail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.
|
4
|
+
version: 1.10.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Brown
|
@@ -9,7 +9,7 @@ autorequire: gurgitate-mail
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-11-08 00:00:00 +09:00
|
13
13
|
default_executable: gurgitate-mail
|
14
14
|
dependencies: []
|
15
15
|
|