3
3
namespace Kiboko \Component \Runtime \Action ;
4
4
5
5
use Kiboko \Component \State ;
6
- use Kiboko \Contract \Pipeline \ActionInterface ;
7
- use Kiboko \Contract \Pipeline \ExecutingActionInterface ;
8
- use Kiboko \Contract \Pipeline \RejectionInterface ;
9
- use Kiboko \Contract \Pipeline \StateInterface ;
6
+ use Kiboko \Contract \Action \ActionState ;
7
+ use Kiboko \Contract \Action \ActionInterface ;
8
+ use Kiboko \Contract \Action \ExecutingActionInterface ;
9
+ use Kiboko \Contract \Action \RejectionInterface ;
10
+ use Kiboko \Contract \Action \StateInterface ;
10
11
use Symfony \Component \Console \Output \ConsoleOutput ;
11
12
12
13
final class Console implements ActionRuntimeInterface
@@ -26,7 +27,7 @@ public function execute(
26
27
RejectionInterface $ rejection ,
27
28
StateInterface $ state ,
28
29
): self {
29
- $ this ->action ->execute ($ action , $ rejection , $ state = new State \ MemoryState ($ state ));
30
+ $ this ->action ->execute ($ action , $ rejection , $ state = new ActionState ($ state ));
30
31
31
32
$ this ->state
32
33
->addMetric ('read ' , $ state ->observeAccept ())
@@ -38,14 +39,8 @@ public function execute(
38
39
39
40
public function run (int $ interval = 1000 ): int
40
41
{
41
- $ line = 0 ;
42
- foreach ($ this ->action ->walk () as $ item ) {
43
- if ($ line ++ % $ interval === 0 ) {
44
- $ this ->state ->update ();
45
- }
46
- };
47
42
$ this ->state ->update ();
48
43
49
- return $ line ;
44
+ return 1 ;
50
45
}
51
46
}
0 commit comments