File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -243,7 +243,6 @@ implementing `DataflowTypeInterface`.
243243
244244Otherwise, manually add the tag `coderhapsodie.dataflow.type` in your dataflow type service configuration :
245245
246- ` ` ` yaml
247246` ` ` yaml
248247CodeRhapsodie\D ataflowExemple\D ataflowType\M yFirstDataflowType:
249248 tags:
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace CodeRhapsodie \DataflowBundle \Command ;
6+
7+ use Symfony \Component \Console \Attribute \AsCommand ;
8+ use Symfony \Component \Console \Command \Command ;
9+ use Symfony \Component \Console \Input \InputInterface ;
10+ use Symfony \Component \Console \Output \OutputInterface ;
11+
12+ #[AsCommand(name: 'code-rhapsodie:job_cleanup ' , description: 'Cleanup job history. ' )]
13+ class JobCleanupCommand extends Command
14+ {
15+ protected function configure ()
16+ {
17+ $ this ->setHelp ('Job retention can be configured with the "job_history_retention" configuration. ' );
18+ }
19+
20+ protected function execute (InputInterface $ input , OutputInterface $ output ): int
21+ {
22+
23+ }
24+ }
Original file line number Diff line number Diff line change @@ -52,6 +52,20 @@ public function getConfigTreeBuilder(): TreeBuilder
5252 ->thenInvalid ('You need "league/flysystem" to use Dataflow file exception mode. ' )
5353 ->end ()
5454 ->end ()
55+ ->arrayNode ('job_history ' )
56+ ->addDefaultsIfNotSet ()
57+ ->children ()
58+ ->integerNode ('retention ' )
59+ ->defaultValue (30 )
60+ ->min (0 )
61+ ->info ('How many days completed jobs are kept when running the cleanup command. ' )
62+ ->end ()
63+ ->integerNode ('forceful_completion_delay ' )
64+ ->defaultValue (24 )
65+ ->min (24 )
66+ ->info ('Running jobs will be forcefully set as completed after this many full calendar days when running the cleanup command. ' )
67+ ->end ()
68+ ->end ()
5569 ->end ()
5670 ;
5771
You can’t perform that action at this time.
0 commit comments