fasten 0.8.8 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fasten/support/stats.rb +5 -1
- data/lib/fasten/task_manager.rb +4 -3
- data/lib/fasten/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4f1399b63f43e69c81204967541b3f37501f0eceaa29cdc1f559fe3cad2a624
|
4
|
+
data.tar.gz: aa29489a9c7c516ba209c1ad9d4d777eb85829a4b2c050407778c312a4647f90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0553cc25064568b62ab6ff4b3ba63a8fc10c1d09493cfc0844758be24f509b9fd0ae372f335cbdc06facbb58159026b9526c694631d47250c625af91785c82c
|
7
|
+
data.tar.gz: 99b50c0529c54ecd65adf2a4127fd744c9b240035178e476cfbdb0770c5ed4c7a8bbf1fc488b07e564e977060361924c4ebded669ed5f2583c29096f37099292
|
data/lib/fasten/support/stats.rb
CHANGED
@@ -25,6 +25,10 @@ module Fasten
|
|
25
25
|
stats_data << row.to_h
|
26
26
|
end
|
27
27
|
|
28
|
+
@tasks.each do |task|
|
29
|
+
stats_last(task)
|
30
|
+
end
|
31
|
+
|
28
32
|
@tasks.waiting = nil
|
29
33
|
rescue StandardError
|
30
34
|
nil
|
@@ -33,7 +37,7 @@ module Fasten
|
|
33
37
|
def save_stats
|
34
38
|
return unless @stats_path && stats_data
|
35
39
|
|
36
|
-
keys = %w[state kind name run cnt avg std err]
|
40
|
+
keys = %w[state kind name run cnt avg std err ini fin]
|
37
41
|
|
38
42
|
CSV.open(@stats_path, 'wb') do |csv|
|
39
43
|
csv << keys
|
data/lib/fasten/task_manager.rb
CHANGED
@@ -149,9 +149,10 @@ module Fasten
|
|
149
149
|
|
150
150
|
@pending -= to_move
|
151
151
|
@waiting += to_move
|
152
|
-
@waiting.sort_by!.with_index do |
|
153
|
-
|
154
|
-
|
152
|
+
@waiting.sort_by!.with_index do |task, index|
|
153
|
+
task.state = :WAIT
|
154
|
+
last_avg = task.last && task.last['avg'] || 0
|
155
|
+
[-task.run_score, -last_avg.to_f, index]
|
155
156
|
end
|
156
157
|
end
|
157
158
|
end
|
data/lib/fasten/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fasten
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aldrin Martoq
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|