navilocal 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/application/ui/navi/main_runner.rb +20 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32227c092996efc613a51d961303e83a0b83c6ef6d70710827eb8804e15a10a8
|
4
|
+
data.tar.gz: e0d7147192c50e26accca711182dc09c3ab36d57af6c75f9c9649569539417da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f8147b3d6c69b774a19ee6c235523a5738e5ce299ef9945445a1a1e893fa81b5a2638c562dc6491bbf7ca9bf7cbc0ff8e6d192db345665202d4f532320634a5
|
7
|
+
data.tar.gz: 234f268cd14a7010ea320a065310be604a56cd0d7c13dc57a9ee65acd5eb042d90b0862b1f4763610efbd13b76a6a64094cc22a2a7fcc9c2ddf1621e1eb116fd
|
@@ -72,6 +72,7 @@ module NaviClientInstaller
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def terminate_worker_thread
|
75
|
+
stop_naviai
|
75
76
|
@worker_thread&.terminate if @worker_thread&.alive?
|
76
77
|
|
77
78
|
end
|
@@ -121,10 +122,12 @@ module NaviClientInstaller
|
|
121
122
|
@email_indicator.label = "#{downloaded}/#{total}"
|
122
123
|
|
123
124
|
begin
|
124
|
-
start_naviai
|
125
|
+
# start_naviai
|
125
126
|
@notifier.label = "Checking for previous failures.."
|
126
127
|
|
128
|
+
start_naviai
|
127
129
|
@client.parse_prev_failed_emails
|
130
|
+
stop_naviai
|
128
131
|
@notifier.label = "Fetching emails..."
|
129
132
|
@client.retrieve_emails(@imap, ['ALL'], folder) do |mail, index, isLast, id|
|
130
133
|
|
@@ -142,7 +145,9 @@ module NaviClientInstaller
|
|
142
145
|
@logger.debug "Sending Bulk Request for #{isLast ? filenames.size : 50} emails to Navi AI."
|
143
146
|
@notifier.label = "Parsing the emails..."
|
144
147
|
|
145
|
-
|
148
|
+
start_naviai
|
149
|
+
@client.send_request(filenames)
|
150
|
+
stop_naviai
|
146
151
|
|
147
152
|
@logger.debug "Complete Ok... continue email sync"
|
148
153
|
@notifier.label = "Fetching emails..."
|
@@ -207,6 +212,19 @@ module NaviClientInstaller
|
|
207
212
|
Process.detach(pid)
|
208
213
|
end
|
209
214
|
|
215
|
+
def stop_naviai
|
216
|
+
# kill naviai process
|
217
|
+
navi_path = File.join NaviClientInstaller::Settings::DEFAULT_STORAGE , 'bin', 'naviai_pid.tmp'
|
218
|
+
begin
|
219
|
+
Process.kill('QUIT', File.read(navi_path).to_i) if File.file? navi_path
|
220
|
+
rescue Errno::ESRCH
|
221
|
+
# process exited normally
|
222
|
+
rescue
|
223
|
+
ensure
|
224
|
+
FileUtils.rm_f navi_path
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
210
228
|
end
|
211
229
|
end
|
212
230
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: navilocal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Msanjib
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.4.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.4.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: httparty
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|