File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 42
42
# robots.txt.
43
43
- /robots\.txt$
44
44
45
+ crons :
46
+ reset :
47
+ # reset the demo every night to avoid overflowing disks and data leftovers
48
+ spec : 30 2 * * *
49
+ cmd : ' bin/console cache:clear --env=prod && bin/console doctrine:phpcr:init:dbal --drop --force -n && bin/console doctrine:phpcr:repository:init -n && bin/console doctrine:phpcr:fixtures:load -n && bin/console --env=prod cache:warmup -n --no-debug'
50
+
45
51
# The size of the persistent disk of the application (in MB).
46
52
disk : 2048
47
53
Original file line number Diff line number Diff line change 1
1
<pre>
2
2
<?php
3
3
4
- $ output = $ return_var = null ;
5
- $ command = __DIR__ .'/../bin/console -v doctrine:phpcr:fixtures:load -e=prod ' ;
6
- echo "Running: $ command \n" ;
7
- exec ($ command , $ output , $ return_var );
4
+ function runCommand ($ command )
5
+ {
6
+ $ output = $ return_var = null ;
7
+ echo "Running: $ command \n" ;
8
+ exec ($ command , $ output , $ return_var );
9
+
10
+ if (empty ($ output ) || !is_array ($ output )) {
11
+ echo 'Fixtures could not be loaded: ' .var_export ($ return_var , true );
12
+ exit (1 );
13
+ }
8
14
9
- if (!empty ($ output ) && is_array ($ output )) {
10
15
echo "Output: \n" ;
11
16
foreach ($ output as $ line ) {
12
17
echo $ line ."\n" ;
13
18
}
14
- } else {
15
- echo 'Fixtures could not be loaded: ' .var_export ($ return_var , true );
16
19
}
20
+
21
+ runCommand (__DIR__ .'/../bin/console cache:clear -e=prod ' );
22
+ runCommand (__DIR__ .'/../bin/console -v doctrine:phpcr:fixtures:load -e=prod ' );
You can’t perform that action at this time.
0 commit comments