Turned off the background import by default, added the script to run the import for all clients.

pull/475/head
Ruslan Baidan 2023-01-13 14:42:11 +01:00
parent 7f923907eb
commit 79fc6467f3
No known key found for this signature in database
GPG Key ID: 4B7724C136BF1D89
2 changed files with 20 additions and 1 deletions

View File

@ -119,6 +119,6 @@ return [
'import' => [ 'import' => [
'uploadFolder' => $appdir . '/data/import/files', 'uploadFolder' => $appdir . '/data/import/files',
'isBackgroundProcessActive' => true, 'isBackgroundProcessActive' => false,
], ],
]; ];

View File

@ -0,0 +1,19 @@
#! /usr/bin/env bash
# local use:
#for conf_file_path in /home/vagrant/monarc/config/*/local.php
for conf_file_path in /var/www/*/local.php
do
config_path=$(dirname "$conf_file_path")
export APP_CONF_DIR=$config_path
echo "[$(date)] Import analyses for: $config_path."
# local use:
#./bin/console monarc:import-analyses >> data/background_import.log
/var/lib/monarc/fo/bin/console monarc:import-analyses >> "$config_path"/data/background_import.log
echo "[$(date)] Finished."
done