evertils 0.3.13 → 0.3.14
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/evertils/types/daily.rb +20 -2
- data/lib/evertils/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: df5675280a5a000058729c6e54421e27450cc331
|
|
4
|
+
data.tar.gz: 3a4429dff8c505fc6a634933d26df86a1eb356c1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9a224f419cc2fbd8d2c78165518358c249260d2e8c073a23fa658c64ac724c6ba372b11e1db97a0be370908a8e44013edb73eef8e2e82b522e943c68bba2eb7f
|
|
7
|
+
data.tar.gz: 59ad4ecbc60745e79cc01b6ff22b02764f686fb0bc8bb1cb4124b4086fe7d4bd6b1c0abd1fa653b5fe89e387c1101e14e1e6be31344d0093164575bd066fa320
|
data/lib/evertils/types/daily.rb
CHANGED
|
@@ -36,8 +36,20 @@ module Evertils
|
|
|
36
36
|
@api = Evertils::Helper.load('ApiEnmlHandler', @config)
|
|
37
37
|
enml = @api.from_str(@format.template_contents(NOTEBOOK))
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
pq = find_priority_queue
|
|
40
|
+
|
|
41
|
+
# didn't find the note the first time? wait and try again
|
|
42
|
+
if pq.entity.nil?
|
|
43
|
+
iter = 0
|
|
44
|
+
loop do
|
|
45
|
+
iter += 1
|
|
46
|
+
pq = find_priority_queue(true)
|
|
47
|
+
break unless pq.entity.nil?
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
Notify.info("#{iter} attempts to find the pq note") unless iter.zero?
|
|
51
|
+
end
|
|
52
|
+
|
|
41
53
|
guid = pq.entity.guid
|
|
42
54
|
user = @model.user_info[:user]
|
|
43
55
|
shard = @model.user_info[:shard]
|
|
@@ -49,6 +61,12 @@ module Evertils
|
|
|
49
61
|
enml.at('li:contains("Queue") ul li').children.first.replace(a)
|
|
50
62
|
@content = enml
|
|
51
63
|
end
|
|
64
|
+
|
|
65
|
+
def find_priority_queue(sleep = false)
|
|
66
|
+
sleep(5) if sleep
|
|
67
|
+
title = @format.date_templates[:'Priority Queue']
|
|
68
|
+
@model.find_note_contents(title)
|
|
69
|
+
end
|
|
52
70
|
end
|
|
53
71
|
end
|
|
54
72
|
end
|
data/lib/evertils/version.rb
CHANGED