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 1313 <service id =" Yokai\Batch\Registry\JobRegistry"
1414 alias =" yokai_batch.job_registry" />
1515
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+
1622 <service id =" Yokai\Batch\Factory\JobExecutionIdGeneratorInterface"
1723 alias =" yokai_batch.job_execution_id_generator.uniqid" />
1824 </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 99
1010 <service id =" yokai_batch.job_launcher.simple"
1111 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" />
1614 </service >
1715 </services >
1816</container >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 99
1010 <service id =" yokai_batch.run_job_command"
1111 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" />
1314 <tag name =" console.command" />
1415 </service >
1516 </services >
Original file line number Diff line number Diff line change 44
55namespace Yokai \Batch \Tests \Bridge \Symfony \Framework \Fixtures ;
66
7- use Yokai \Batch \Job \AbstractJob ;
7+ use Yokai \Batch \Job \JobInterface ;
88use Yokai \Batch \JobExecution ;
99
10- final class DummyJob extends AbstractJob
10+ final class DummyJob implements JobInterface
1111{
12- protected function doExecute (JobExecution $ jobExecution ): void
12+ public function execute (JobExecution $ jobExecution ): void
1313 {
1414 // dummy
1515 }
Original file line number Diff line number Diff line change 55namespace Yokai \Batch \Tests \Bridge \Symfony \Framework \Fixtures ;
66
77use Yokai \Batch \Bridge \Symfony \Framework \JobWithStaticNameInterface ;
8- use Yokai \Batch \Job \AbstractJob ;
8+ use Yokai \Batch \Job \JobInterface ;
99use Yokai \Batch \JobExecution ;
1010
11- final class DummyJobWithName extends AbstractJob implements JobWithStaticNameInterface
11+ final class DummyJobWithName implements JobInterface, JobWithStaticNameInterface
1212{
1313 public static function getJobName (): string
1414 {
1515 return 'export_orders_job ' ;
1616 }
1717
18- protected function doExecute (JobExecution $ jobExecution ): void
18+ public function execute (JobExecution $ jobExecution ): void
1919 {
2020 // dummy
2121 }
You can’t perform that action at this time.
0 commit comments