Skip to content

Commit 13338fe

Browse files
authored
JobExecution id generation (#13)
* Centralize JobExecution default id generation * Use service to generate JobExecution id
1 parent ff87aec commit 13338fe

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/Resources/services/global/alias.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@
1212

1313
<service id="Yokai\Batch\Registry\JobRegistry"
1414
alias="yokai_batch.job_registry"/>
15+
16+
<service id="Yokai\Batch\Factory\JobExecutionIdGeneratorInterface"
17+
alias="yokai_batch.job_execution_id_generator.uniqid"/>
1518
</services>
1619
</container>

src/Resources/services/global/factory.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
<defaults public="false"/>
99

1010
<service id="yokai_batch.job_execution_factory"
11-
class="Yokai\Batch\Factory\JobExecutionFactory"/>
11+
class="Yokai\Batch\Factory\JobExecutionFactory">
12+
<argument type="service" id="Yokai\Batch\Factory\JobExecutionIdGeneratorInterface"/>
13+
</service>
14+
15+
<service id="yokai_batch.job_execution_id_generator.uniqid"
16+
class="Yokai\Batch\Factory\UniqidJobExecutionIdGenerator"/>
1217
</services>
1318
</container>

0 commit comments

Comments
 (0)