concurrent_executor 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b4133517b7c5bf096c59d681407a402e57a0c1269dcebf5373f851a931d3f74c
4
- data.tar.gz: db6df18faa9ea13a5c4bf76fbfea9e0e91c912aa014f552047dba4bb35845c91
3
+ metadata.gz: ccdf00556bc04acd3d2d50890ba33812e28a2f06d9a84cd02d759c6db463d75c
4
+ data.tar.gz: e1bb12b8f6690eebfad033cf119ea1c5affbecdd78ba04f54323779c12012b4f
5
5
  SHA512:
6
- metadata.gz: '099f52c9fbf4dbab34056430d7f075d20c1d8e53ceec68166a2033c86ce438417fe02f1b2fc91bd7a4de65e9f46f53862b83710972d5fbe3b7d966f22bc6ee80'
7
- data.tar.gz: d229de2a71b9dc4c593d7d5d4c0fa85ebb997792c71ca6ae8ec22dfb6122ab55403621f21fd5f119dd306b1eb3d97525015d4bb96a952b0c5236b93fb924374b
6
+ metadata.gz: 117093f4daced145690f008ecb0fdeb0423f2911bd31c8a685be57942a9ed3fcca12977c2f508a7d6699cb54058dce81b535f488e707ed483417f4fbc2b05c3f
7
+ data.tar.gz: 4121850b3c066d4e5b7b05525e681148f3e57fb95a594eb3dc0d986055b86610e423848ef241f894316584970ce9ae4a58386e25b6594ceed20e29e45ffefd0c
@@ -6,54 +6,55 @@ PATH
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- ast (2.4.0)
10
- codecov (0.1.16)
11
- json
12
- simplecov
13
- url
14
- coderay (1.1.2)
15
- diff-lcs (1.3)
16
- docile (1.3.2)
17
- jaro_winkler (1.5.4)
18
- json (2.3.0)
9
+ ast (2.4.2)
10
+ codecov (0.4.0)
11
+ simplecov (>= 0.15, < 0.22)
12
+ coderay (1.1.3)
13
+ diff-lcs (1.4.4)
14
+ docile (1.3.5)
19
15
  method_source (1.0.0)
20
- parallel (1.19.1)
21
- parser (2.7.0.2)
22
- ast (~> 2.4.0)
23
- pry (0.13.0)
16
+ parallel (1.20.1)
17
+ parser (3.0.0.0)
18
+ ast (~> 2.4.1)
19
+ pry (0.13.1)
24
20
  coderay (~> 1.1)
25
21
  method_source (~> 1.0)
26
22
  rainbow (3.0.0)
27
23
  rake (12.3.3)
24
+ regexp_parser (2.0.3)
28
25
  rexml (3.2.4)
29
- rspec (3.9.0)
30
- rspec-core (~> 3.9.0)
31
- rspec-expectations (~> 3.9.0)
32
- rspec-mocks (~> 3.9.0)
33
- rspec-core (3.9.1)
34
- rspec-support (~> 3.9.1)
35
- rspec-expectations (3.9.1)
26
+ rspec (3.10.0)
27
+ rspec-core (~> 3.10.0)
28
+ rspec-expectations (~> 3.10.0)
29
+ rspec-mocks (~> 3.10.0)
30
+ rspec-core (3.10.1)
31
+ rspec-support (~> 3.10.0)
32
+ rspec-expectations (3.10.1)
36
33
  diff-lcs (>= 1.2.0, < 2.0)
37
- rspec-support (~> 3.9.0)
38
- rspec-mocks (3.9.1)
34
+ rspec-support (~> 3.10.0)
35
+ rspec-mocks (3.10.1)
39
36
  diff-lcs (>= 1.2.0, < 2.0)
40
- rspec-support (~> 3.9.0)
41
- rspec-support (3.9.2)
42
- rubocop (0.80.0)
43
- jaro_winkler (~> 1.5.1)
37
+ rspec-support (~> 3.10.0)
38
+ rspec-support (3.10.1)
39
+ rubocop (1.8.1)
44
40
  parallel (~> 1.10)
45
- parser (>= 2.7.0.1)
41
+ parser (>= 3.0.0.0)
46
42
  rainbow (>= 2.2.2, < 4.0)
43
+ regexp_parser (>= 1.8, < 3.0)
47
44
  rexml
45
+ rubocop-ast (>= 1.2.0, < 2.0)
48
46
  ruby-progressbar (~> 1.7)
49
- unicode-display_width (>= 1.4.0, < 1.7)
50
- ruby-progressbar (1.10.1)
51
- simplecov (0.18.5)
47
+ unicode-display_width (>= 1.4.0, < 3.0)
48
+ rubocop-ast (1.4.1)
49
+ parser (>= 2.7.1.5)
50
+ ruby-progressbar (1.11.0)
51
+ simplecov (0.21.2)
52
52
  docile (~> 1.1)
53
53
  simplecov-html (~> 0.11)
54
- simplecov-html (0.12.2)
55
- unicode-display_width (1.6.1)
56
- url (0.3.2)
54
+ simplecov_json_formatter (~> 0.1)
55
+ simplecov-html (0.12.3)
56
+ simplecov_json_formatter (0.1.2)
57
+ unicode-display_width (2.0.0)
57
58
 
58
59
  PLATFORMS
59
60
  ruby
@@ -66,10 +66,18 @@ class ConcurrentExecutor
66
66
  end
67
67
  end
68
68
 
69
+ def metadata
70
+ {queue_size: queue.size}
71
+ end
72
+
69
73
  def work_loop
70
74
  while (work_item = queue.pop)
71
75
  begin
72
- executor.call(work_item)
76
+ if executor.arity == 1
77
+ executor.call(work_item)
78
+ else
79
+ executor.call(work_item, metadata)
80
+ end
73
81
  rescue StandardError => e
74
82
  @errors << e
75
83
  queue.clear
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ConcurrentExecutorVersion
4
- VERSION = '1.1.0'
4
+ VERSION = '1.2.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: concurrent_executor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Malinconico
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-12 00:00:00.000000000 Z
11
+ date: 2021-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: codecov
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  requirements: []
110
- rubygems_version: 3.0.3
110
+ rubygems_version: 3.1.2
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Execute things concurrently