File tree Expand file tree Collapse file tree 8 files changed +52
-44
lines changed Expand file tree Collapse file tree 8 files changed +52
-44
lines changed Original file line number Diff line number Diff line change 13
13
<service id =" Yokai\Batch\Registry\JobRegistry"
14
14
alias =" yokai_batch.job_registry" />
15
15
16
+ <service id =" Yokai\Batch\Job\JobExecutionAccessor"
17
+ alias =" yokai_batch.job_execution_accessor" />
18
+
19
+ <service id =" Yokai\Batch\Job\JobExecutor"
20
+ alias =" yokai_batch.job_executor" />
21
+
16
22
<service id =" Yokai\Batch\Factory\JobExecutionIdGeneratorInterface"
17
23
alias =" yokai_batch.job_execution_id_generator.uniqid" />
18
24
</services >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+
3
+ <container xmlns =" http://symfony.com/schema/dic/services"
4
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd" >
6
+
7
+ <services >
8
+ <defaults public =" false" />
9
+
10
+ <service id =" yokai_batch.job_execution_factory"
11
+ class =" Yokai\Batch\Factory\JobExecutionFactory" >
12
+ <argument type =" service" id =" Yokai\Batch\Factory\JobExecutionIdGeneratorInterface" />
13
+ </service >
14
+
15
+ <service id =" yokai_batch.job_registry"
16
+ class =" Yokai\Batch\Registry\JobRegistry" >
17
+ <argument />
18
+ </service >
19
+
20
+ <service id =" yokai_batch.job_execution_accessor"
21
+ class =" Yokai\Batch\Job\JobExecutionAccessor" >
22
+ <argument type =" service" id =" yokai_batch.job_execution_factory" />
23
+ <argument type =" service" id =" Yokai\Batch\Storage\JobExecutionStorageInterface" />
24
+ </service >
25
+
26
+ <service id =" yokai_batch.job_executor"
27
+ class =" Yokai\Batch\Job\JobExecutor" >
28
+ <argument type =" service" id =" yokai_batch.job_registry" />
29
+ <argument type =" service" id =" Yokai\Batch\Storage\JobExecutionStorageInterface" />
30
+ <argument type =" service" id =" event_dispatcher" on-invalid =" null" />
31
+ </service >
32
+
33
+ <service id =" yokai_batch.job_execution_id_generator.uniqid"
34
+ class =" Yokai\Batch\Factory\UniqidJobExecutionIdGenerator" />
35
+ </services >
36
+ </container >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 9
9
10
10
<service id =" yokai_batch.job_launcher.simple"
11
11
class =" Yokai\Batch\Launcher\SimpleJobLauncher" >
12
- <argument type =" service" id =" yokai_batch.job_registry" />
13
- <argument type =" service" id =" yokai_batch.job_execution_factory" />
14
- <argument type =" service" id =" Yokai\Batch\Storage\JobExecutionStorageInterface" />
15
- <argument type =" service" id =" event_dispatcher" on-invalid =" null" />
12
+ <argument type =" service" id =" yokai_batch.job_execution_accessor" />
13
+ <argument type =" service" id =" yokai_batch.job_executor" />
16
14
</service >
17
15
</services >
18
16
</container >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 9
9
10
10
<service id =" yokai_batch.run_job_command"
11
11
class =" Yokai\Batch\Bridge\Symfony\Console\RunJobCommand" >
12
- <argument type =" service" id =" yokai_batch.job_launcher.simple" />
12
+ <argument type =" service" id =" yokai_batch.job_execution_accessor" />
13
+ <argument type =" service" id =" yokai_batch.job_executor" />
13
14
<tag name =" console.command" />
14
15
</service >
15
16
</services >
Original file line number Diff line number Diff line change 4
4
5
5
namespace Yokai \Batch \Tests \Bridge \Symfony \Framework \Fixtures ;
6
6
7
- use Yokai \Batch \Job \AbstractJob ;
7
+ use Yokai \Batch \Job \JobInterface ;
8
8
use Yokai \Batch \JobExecution ;
9
9
10
- final class DummyJob extends AbstractJob
10
+ final class DummyJob implements JobInterface
11
11
{
12
- protected function doExecute (JobExecution $ jobExecution ): void
12
+ public function execute (JobExecution $ jobExecution ): void
13
13
{
14
14
// dummy
15
15
}
Original file line number Diff line number Diff line change 5
5
namespace Yokai \Batch \Tests \Bridge \Symfony \Framework \Fixtures ;
6
6
7
7
use Yokai \Batch \Bridge \Symfony \Framework \JobWithStaticNameInterface ;
8
- use Yokai \Batch \Job \AbstractJob ;
8
+ use Yokai \Batch \Job \JobInterface ;
9
9
use Yokai \Batch \JobExecution ;
10
10
11
- final class DummyJobWithName extends AbstractJob implements JobWithStaticNameInterface
11
+ final class DummyJobWithName implements JobInterface, JobWithStaticNameInterface
12
12
{
13
13
public static function getJobName (): string
14
14
{
15
15
return 'export_orders_job ' ;
16
16
}
17
17
18
- protected function doExecute (JobExecution $ jobExecution ): void
18
+ public function execute (JobExecution $ jobExecution ): void
19
19
{
20
20
// dummy
21
21
}
You can’t perform that action at this time.
0 commit comments