File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ services:
24
24
arguments :
25
25
- ' %kernel.root_dir%'
26
26
- ' @Markup\JobQueueBundle\Repository\JobStatusRepository'
27
+ - ' %kernel.environment%'
27
28
markup_job_queue.writer.supervisord_config_file :
28
29
class : Markup\JobQueueBundle\Service\SupervisordConfigFileWriter
29
30
arguments :
Original file line number Diff line number Diff line change @@ -41,12 +41,19 @@ class RecurringConsoleCommandReader
41
41
/** @var JobStatusRepository */
42
42
private $ jobStatusRepository ;
43
43
44
+ /**
45
+ * @var string
46
+ */
47
+ private $ kernelEnv ;
48
+
44
49
public function __construct (
45
50
string $ kernelPath ,
46
- JobStatusRepository $ jobStatusRepository
51
+ JobStatusRepository $ jobStatusRepository ,
52
+ string $ kernelEnv
47
53
) {
48
54
$ this ->kernelPath = $ kernelPath ;
49
55
$ this ->jobStatusRepository = $ jobStatusRepository ;
56
+ $ this ->kernelEnv = $ kernelEnv ;
50
57
}
51
58
52
59
public function setConfigurationFileName ($ name )
@@ -140,6 +147,11 @@ private function parseConfiguration(array $config)
140
147
throw new InvalidConfigurationException (sprintf ('`arguments` config key must be an array for %s ' , $ group ['command ' ]));
141
148
}
142
149
150
+ // user management by default when environment is not prod
151
+ if ($ this ->kernelEnv !== 'prod ' && !isset ($ group ['user_managed ' ])) {
152
+ $ group ['user_managed ' ] = true ;
153
+ }
154
+
143
155
$ recurringConsoleCommandConfiguration = new RecurringConsoleCommandConfiguration (
144
156
$ group ['command ' ],
145
157
$ group ['arguments ' ] ?? [],
You can’t perform that action at this time.
0 commit comments