wco_models 3.1.0.324 → 3.1.0.325
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/tasks/office_tasks.rake +7 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d95eea4a598e5389d573c28d57e23e740eee706e16d49f11caa94cc4da9aff2a
|
|
4
|
+
data.tar.gz: 207e4184c9e47dcf4b5453cea12f912980295be59119c5ee2a010278591d7591
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: caa0ef2c0ee957e1d1d64cdd46ea4e1d4a85156e95af185cf8dd0fc5e38159aeda7aa39f8456fceae8383cfd1663a56a93f1ace6b7451c703702ed2bdc1fd40d
|
|
7
|
+
data.tar.gz: 8b2149ea65ba1d0ee33d163b73c89ff73f2e702d5c45d8b6cbd5d6218f85f9449e9fa3e39621c7a8548a956c2afb7f29ff12093421a613d344168ef414b9958e
|
data/lib/tasks/office_tasks.rake
CHANGED
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
require 'business_time'
|
|
3
3
|
require 'httparty'
|
|
4
4
|
|
|
5
|
+
STDOUT.sync = true
|
|
6
|
+
STDERR.sync = true
|
|
7
|
+
|
|
8
|
+
|
|
5
9
|
namespace :wco do
|
|
6
10
|
|
|
7
11
|
|
|
8
12
|
desc 'run office actions'
|
|
9
13
|
task run_office_actions: :environment do
|
|
10
|
-
STDOUT.sync = true
|
|
11
|
-
STDERR.sync = true
|
|
12
14
|
|
|
13
15
|
puts! "Starting wco_email:run_office_actions in #{Rails.env}..."
|
|
14
16
|
while true do
|
|
15
17
|
|
|
16
18
|
schs = Wco::OfficeAction.active.where({ :perform_at.lte => Time.now })
|
|
17
|
-
|
|
19
|
+
print! "[#{schs.length} oats]" if schs.length != 0
|
|
18
20
|
schs.each do |sch|
|
|
19
21
|
sch.do_run
|
|
20
22
|
print! "[#{sch.id}]^"
|
|
@@ -23,14 +25,14 @@ namespace :wco do
|
|
|
23
25
|
|
|
24
26
|
## copy-pasted from wco_email tasks run_email_actions
|
|
25
27
|
schs = WcoEmail::EmailAction.active.where({ :perform_at.lte => Time.now })
|
|
26
|
-
|
|
28
|
+
print! "[#{schs.length} eats]" if schs.length != 0
|
|
27
29
|
schs.each do |sch|
|
|
28
30
|
sch.do_run
|
|
29
31
|
print! "[#{sch.id}]^"
|
|
30
32
|
sleep 15
|
|
31
33
|
end
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
print! '.'
|
|
34
36
|
sleep 15
|
|
35
37
|
end
|
|
36
38
|
end
|