arcgis_vrps 0.0.4.15 → 0.0.4.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arcgis_vrps.rb +12 -6
- 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: 2be5cf1c7165adbd31b697619be2e35f0852da14
|
4
|
+
data.tar.gz: fc2b17c8e60dad81e647b06193000407103301e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 940aa99310de0ec43d29554829b74a930d17ccd96d92373ccd4b84af81ab1c3756ef91e93eae4cf39681408703cb1fe9130147ec5351f53bdd353a1af58e5a8a
|
7
|
+
data.tar.gz: d02b54098455c31d57d3827f3da0a9e735b4c7fefa07066380b17f71428870263a13b1a35c71b6f50672898b5b242e0385d82a6c91ba0991e2a96b23c578c3c5
|
data/lib/arcgis_vrps.rb
CHANGED
@@ -48,7 +48,7 @@ class Arcgis_Vrps
|
|
48
48
|
|
49
49
|
jobStatusNoOfCalls = 0
|
50
50
|
|
51
|
-
t1 = Time.now
|
51
|
+
t1 = Time.now.to_i
|
52
52
|
|
53
53
|
url = "https://logistics.arcgis.com/arcgis/rest/services/World/VehicleRoutingProblem/GPServer/SolveVehicleRoutingProblem/submitJob"
|
54
54
|
escaped_url = URI.encode(url)
|
@@ -118,7 +118,7 @@ class Arcgis_Vrps
|
|
118
118
|
# puts completed.to_s
|
119
119
|
# puts
|
120
120
|
|
121
|
-
t2 = Time.now
|
121
|
+
t2 = Time.now.to_i
|
122
122
|
|
123
123
|
time_jobStatusIsComplete = t2-t1
|
124
124
|
|
@@ -130,14 +130,20 @@ class Arcgis_Vrps
|
|
130
130
|
ordersReceived = getOutputOrders(nil)
|
131
131
|
# ordersReceived = "Orders received: \n #{ordersReceived}"
|
132
132
|
|
133
|
-
t3 = Time.now
|
133
|
+
t3 = Time.now.to_i
|
134
134
|
|
135
135
|
time_fullJobComplete = t3-t1
|
136
136
|
|
137
|
-
extraContent = "Total time taken for getting routes and orders: #{time_fullJobComplete} \nNumber of calls to jobStatus: #{jobStatusNoOfCalls} \n\n"
|
137
|
+
# extraContent = "Total time taken for getting routes and orders: #{time_fullJobComplete} \nNumber of calls to jobStatus: #{jobStatusNoOfCalls} \n\n"
|
138
138
|
|
139
|
-
|
140
|
-
|
139
|
+
extraContent = {
|
140
|
+
:time_job_status_complete => time_jobStatusIsComplete,
|
141
|
+
:time_full_job_complete => time_fullJobComplete,
|
142
|
+
:no_of_job_status_call => jobStatusNoOfCalls
|
143
|
+
}
|
144
|
+
|
145
|
+
# puts extraContent
|
146
|
+
# puts
|
141
147
|
|
142
148
|
return extraContent, routesReceived, ordersReceived
|
143
149
|
rescue Exception => e
|