diff --git a/.env b/.env
index 1f3824846a..60ac9edbea 100644
--- a/.env
+++ b/.env
@@ -14,7 +14,7 @@ MYSQL_ROOT_PASSWORD=root
SERVER_NAME=phraseanet-docker
-# --------------- APPLICATION CONFIGURATION --------------------
+# --------------- PHP CONFIGURATION --------------------
# Max upload size
MAX_BODY_SIZE=2G
@@ -29,26 +29,41 @@ SESSION_CACHE_LIMITER=off
# PHP LOG LEVEL : Possible Values: alert, error, warning, notice, debug
PHP_LOG_LEVEL=warning
-# --------------- APPLICATION STARTUP CONFIGURATION --------------------
+# --------------- PHRASEANET CONFIGURATION --------------------
-# These variables are only used if the configuration.yml file is not present, in order to automate the installation procedure
+# These variables are used in the configuration.yml .
# set here the first user / email couple
-INSTALL_ACCOUNT_EMAIL=admin@alchemy.fr
-INSTALL_ACCOUNT_PASSWORD=iJRqXU0MwbyJewQLBbra6IWHsWly
+PHRASEANET_ADMIN_ACCOUNT_EMAIL=admin@alchemy.fr
+PHRASEANET_ADMIN_ACCOUNT_PASSWORD=iJRqXU0MwbyJewQLBbra6IWHsWly
# Database parameters
-INSTALL_DB_HOST=db
-INSTALL_DB_PORT=3306
-INSTALL_DB_USER=root
-INSTALL_DB_PASSWORD=root
-INSTALL_DB_TEMPLATE=en-simple
+PHRASEANET_DB_HOST=db
+PHRASEANET_DB_PORT=3306
+PHRASEANET_DB_USER=root
+PHRASEANET_DB_PASSWORD=root
+INSTALL_DB_TEMPLATE=DublinCore
INSTALL_APPBOX=ab_master
INSTALL_DATABOX=db_databox1
-INSTALL_SERVER_NAME=localhost
+PHRASEANET_SERVER_NAME=localhost
# Mysql max allowed packet
MYSQL_MAX_ALLOWED_PACKET=16M
+# api
+PHRASEANET_API_ENABLED=true
+PHRASEANET_API_SSL=true
+
+# Phraseanet mail configuration
+PHRASEANET_EMITTER_EMAIL=phraseanet@example.com
+PHRASEANET_MAIL_OBJECT_PREFIX=
+PHRASEANET_SMTP_ENABLED=false
+PHRASEANET_SMTP_HOST=
+PHRASEANET_SMTP_PORT=
+PHRASEANET_SMTP_AUTH_ENABLED=false
+PHRASEANET_SMTP_SECURE_MODE=tls
+PHRASEANET_SMTP_USER=
+PHRASEANET_SMTP_PASSWORD=
+
# --- DEV purpose ---
@@ -63,7 +78,7 @@ PHRASEANET_SUBNET_IPS=172.32.0.0/16
XDEBUG_REMOTE_HOST=172.32.0.1
PHP_IDE_CONFIG=serverName=docker-server-phraseanet
-# Volumes location for dev
+# Volumes location
PHRASEANET_CONFIG_DIR=./config
PHRASEANET_LOGS_DIR=./logs
PHRASEANET_DATA_DIR=./datas
@@ -73,6 +88,11 @@ PHRASEANET_THUMBNAILS_DIR=./www/thumbnails
PHRASEANET_CUSTOM_DIR=./www/custom
PHRASEANET_TMP_DIR=./tmp
PHRASEANET_CACHE_DIR=./cache
+PHRASEANET_DOWNLOAD_DIR=./datas/download
+PHRASEANET_LAZARET_DIR=./datas/lazaret
+PHRASEANET_CAPTION_DIR=./tmp/caption
+PHRASEANET_WORKER_TMP=./tmp/worker
+
# For dev who don't have SSH_AUTH_SOCK (avoid an empty volume name)
diff --git a/docker-compose.override.yml b/docker-compose.override.yml
index ef5b56c55f..838e32e64c 100644
--- a/docker-compose.override.yml
+++ b/docker-compose.override.yml
@@ -35,6 +35,7 @@ services:
- ${PHRASEANET_DATA_DIR}:/var/alchemy/Phraseanet/datas:rw
- ${PHRASEANET_THUMBNAILS_DIR}:/var/alchemy/Phraseanet/www/thumbnails:rw
- ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw
+ - ${PHRASEANET_CACHE_DIR}:/var/alchemy/Phraseanet/cache:rw
- ${SSH_AUTH_SOCK}:/ssh-auth-sock
- ${HOME}/.ssh:/home/app/.ssh
- dev_vol:/home/app
@@ -54,7 +55,8 @@ services:
- ${PHRASEANET_DATA_DIR}:/var/alchemy/Phraseanet/datas:rw
- ${PHRASEANET_THUMBNAILS_DIR}:/var/alchemy/Phraseanet/www/thumbnails:rw
- ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw
- - ${PHRASEANET_TMP_DIR}:/var/alchemy/Phraseanet/tmp:rw
+ - ${PHRASEANET_CACHE_DIR}:/var/alchemy/Phraseanet/cache:rw
+ - ${PHRASEANET_TMP_DIR}:/var/alchemy/Phraseanet/tmp:rw
worker:
volumes:
@@ -65,8 +67,9 @@ services:
- ${PHRASEANET_DATA_DIR}:/var/alchemy/Phraseanet/datas:rw
- ${PHRASEANET_THUMBNAILS_DIR}:/var/alchemy/Phraseanet/www/thumbnails:rw
- ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw
+ - ${PHRASEANET_CACHE_DIR}:/var/alchemy/Phraseanet/cache:rw
- ${PHRASEANET_TMP_DIR}:/var/alchemy/Phraseanet/tmp:rw
-
+
rabbitmq:
ports:
- ${RABBITMQ_MANAGEMENT_PORT}:15672
@@ -75,12 +78,6 @@ services:
volumes:
- ${PHRASEANET_DB_DIR}:/var/lib/mysql:rw
- mailhog:
- image: mailhog/mailhog
- ports:
- - 1025:1025
- - 8025:8025
-
elasticsearch:
ports:
- 9200:9200
@@ -121,7 +118,3 @@ networks:
ipam:
config:
- subnet: $PHRASEANET_SUBNET_IPS
-
-volumes:
- dev_vol:
- driver: local
diff --git a/docker-compose.yml b/docker-compose.yml
index 3eee64c36a..d8d716cb4e 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -11,9 +11,9 @@ services:
image: $PHRASEANET_DOCKER_REGISTRY/phraseanet-nginx:$PHRASEANET_DOCKER_TAG
restart: on-failure
volumes:
- - data_vol:/var/alchemy/Phraseanet/datas:rw
- - thumbnails_vol:/var/alchemy/Phraseanet/www/thumbnails:rw
- - custom_vol:/var/alchemy/Phraseanet/www/custom:rw
+ - ${PHRASEANET_DATA_DIR}:/var/alchemy/Phraseanet/datas:rw
+ - ${PHRASEANET_THUMBNAILS_DIR}:/var/alchemy/Phraseanet/www/thumbnails:rw
+ - ${PHRASEANET_CUSTOM_DIR}:/var/alchemy/Phraseanet/www/custom:rw
depends_on:
- phraseanet
environment:
@@ -42,18 +42,27 @@ services:
- OPCACHE_ENABLED
- SESSION_CACHE_LIMITER
- PHP_LOG_LEVEL
- - INSTALL_ACCOUNT_EMAIL
- - INSTALL_ACCOUNT_PASSWORD
- - INSTALL_DB_HOST
- - INSTALL_DB_PORT
- - INSTALL_DB_USER
- - INSTALL_DB_PASSWORD
+ - PHRASEANET_ADMIN_ACCOUNT_EMAIL
+ - PHRASEANET_ADMIN_ACCOUNT_PASSWORD
+ - PHRASEANET_DB_HOST
+ - PHRASEANET_DB_PORT
+ - PHRASEANET_DB_USER
+ - PHRASEANET_DB_PASSWORD
- INSTALL_DB_TEMPLATE
- INSTALL_APPBOX
- INSTALL_DATABOX
- - INSTALL_SERVER_NAME
- - INSTALL_RABBITMQ_USER=$RABBITMQ_DEFAULT_USER
- - INSTALL_RABBITMQ_PASSWORD=$RABBITMQ_DEFAULT_PASS
+ - PHRASEANET_SERVER_NAME
+ - PHRASEANET_RABBITMQ_USER=$RABBITMQ_DEFAULT_USER
+ - PHRASEANET_RABBITMQ_PASSWORD=$RABBITMQ_DEFAULT_PASS
+ - PHRASEANET_EMITTER_EMAIL
+ - PHRASEANET_MAIL_OBJECT_PREFIX
+ - PHRASEANET_SMTP_ENABLED
+ - PHRASEANET_SMTP_HOST
+ - PHRASEANET_SMTP_PORT
+ - PHRASEANET_SMTP_AUTH_ENABLED
+ - PHRASEANET_SMTP_SECURE_MODE
+ - PHRASEANET_SMTP_USER
+ - PHRASEANET_SMTP_PASSWORD
volumes:
- config_vol:/var/alchemy/Phraseanet/config:rw
- data_vol:/var/alchemy/Phraseanet/datas:rw
@@ -101,7 +110,7 @@ services:
- MYSQL_ROOT_PASSWORD
- MYSQL_MAX_ALLOWED_PACKET
volumes:
- - db_vol:/var/lib/mysql
+ - ${PHRASEANET_DB_DIR}:/var/lib/mysql
rabbitmq:
image: rabbitmq:3-management
@@ -119,7 +128,13 @@ services:
build: ./docker/elasticsearch
restart: on-failure
volumes:
- - elasticsearch_vol:/usr/share/elasticsearch/data
+ - ${PHRASEANET_ELASTICSEARCH_DIR}:/usr/share/elasticsearch/data
+
+ mailhog:
+ image: mailhog/mailhog
+ ports:
+ - 1025:1025
+ - 8025:8025
volumes:
config_vol:
@@ -141,3 +156,5 @@ volumes:
# to be replacer by stdout/stderr
logs_vol:
driver: local
+ dev_vol:
+ driver: local
\ No newline at end of file
diff --git a/docker/phraseanet/auto-install.sh b/docker/phraseanet/auto-install.sh
index c408f4aafa..2742102be1 100755
--- a/docker/phraseanet/auto-install.sh
+++ b/docker/phraseanet/auto-install.sh
@@ -2,29 +2,41 @@
set -xe
-if [ -z "$INSTALL_ACCOUNT_EMAIL" ]; then
- echo "INSTALL_ACCOUNT_EMAIL var is not set."
+if [ -z "$PHRASEANET_ADMIN_ACCOUNT_EMAIL" ]; then
+ echo "PHRASEANET_ADMIN_ACCOUNT_EMAIL, Phraseanet admin account var is not set."
exit 1
fi
-if [ -z "$INSTALL_ACCOUNT_PASSWORD" ]; then
- echo "INSTALL_ACCOUNT_PASSWORD var is not set."
+if [ -z "$PHRASEANET_ADMIN_ACCOUNT_PASSWORD " ]; then
+ echo "$PHRASEANET_ADMIN_ACCOUNT_PASSWORD, Phaseanet admin password var is not set."
exit 1
fi
/var/alchemy/Phraseanet/bin/setup system:install \
- --email=$INSTALL_ACCOUNT_EMAIL \
- --password=$INSTALL_ACCOUNT_PASSWORD \
- --db-host=$INSTALL_DB_HOST \
- --db-port=$INSTALL_DB_PORT \
- --db-user=$INSTALL_DB_USER \
- --db-password=$INSTALL_DB_PASSWORD \
+ --email=$PHRASEANET_ADMIN_ACCOUNT_EMAIL \
+ --password=$PHRASEANET_ADMIN_ACCOUNT_PASSWORD \
+ --db-host=$PHRASEANET_DB_HOST \
+ --db-port=$PHRASEANET_DB_PORT \
+ --db-user=$PHRASEANET_DB_USER \
+ --db-password=$PHRASEANET_DB_PASSWORD \
--db-template=$INSTALL_DB_TEMPLATE \
--appbox=$INSTALL_APPBOX \
--databox=$INSTALL_DATABOX \
- --server-name=$INSTALL_SERVER_NAME \
+ --server-name=$PHRASEANET_SERVER_NAME \
+ --download-path=$PHRASEANET_DOWNLOAD_DIR \
+ --lazaret-path=$PHRASEANET_LAZARET_DIR \
+ --caption-path=$PHRASEANET_CAPTION_DIR \
+ --worker-tmp-files=$PHRASEANET_WORKER_TMP \
--data-path=/var/alchemy/Phraseanet/datas -y
+ # Bus configuration for scheduler & worker
+bin/setup system:config set workers.queue.worker-queue.registry alchemy_worker.queue_registry
+bin/setup system:config set workers.queue.worker-queue.host rabbitmq
+bin/setup system:config set workers.queue.worker-queue.port 5672
+bin/setup system:config set workers.queue.worker-queue.user $PHRASEANET_RABBITMQ_USER
+bin/setup system:config set workers.queue.worker-queue.password $PHRASEANET_RABBITMQ_PASSWORD
+bin/setup system:config set workers.queue.worker-queue.vhost /
+
/var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.host elasticsearch
/var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.minScore 2
/var/alchemy/Phraseanet/bin/setup system:config set main.search-engine.options.minScore 2
@@ -38,22 +50,19 @@ fi
/var/alchemy/Phraseanet/bin/setup system:config set main.cache.options.namespace $INSTALL_SERVER_NAME
/var/alchemy/Phraseanet/bin/setup system:config set main.cache.type redis
-# Bus configuration for scheduler & worker
-bin/setup system:config set workers.queue.worker-queue.registry alchemy_worker.queue_registry
-bin/setup system:config set workers.queue.worker-queue.host rabbitmq
-bin/setup system:config set workers.queue.worker-queue.port 5672
-bin/setup system:config set workers.queue.worker-queue.user $INSTALL_RABBITMQ_USER
-bin/setup system:config set workers.queue.worker-queue.password $INSTALL_RABBITMQ_PASSWORD
-bin/setup system:config set workers.queue.worker-queue.vhost /
-
-# Create elasticsearch index
-/var/alchemy/Phraseanet/bin/console searchengine:index -c
-
## enable API and disable ssl on it
-/var/alchemy/Phraseanet/bin/setup system:config set registry.api-clients.api-enabled true
-/var/alchemy/Phraseanet/bin/setup system:config set main.api_require_ssl false
+/var/alchemy/Phraseanet/bin/setup system:config set registry.api-clients.api-enabled $PHRASEANET_API_ENABLED
+/var/alchemy/Phraseanet/bin/setup system:config set main.api_require_ssl $PHRASEANET_API_SSL
# set instance title
bin/setup system:config set registry.general.title $PHRASEANET_PROJECT_NAME
/var/alchemy/Phraseanet/bin/console compile:configuration
+
+# Create elasticsearch index
+/var/alchemy/Phraseanet/bin/console searchengine:index -c
+
+# Create _TRASH_ collection on first databox
+/var/alchemy/Phraseanet/bin/console collection:create 1 Public -d 1
+/var/alchemy/Phraseanet/bin/console collection:create 1 Private -d 1
+/var/alchemy/Phraseanet/bin/console collection:create 1 _TRASH_ -d 1
diff --git a/docker/phraseanet/entrypoint.sh b/docker/phraseanet/entrypoint.sh
index 621d8c2e5f..9d22cef4ff 100755
--- a/docker/phraseanet/entrypoint.sh
+++ b/docker/phraseanet/entrypoint.sh
@@ -18,8 +18,20 @@ chown -R app:app \
FILE=config/configuration.yml
if [ -f "$FILE" ]; then
- bin/setup system:config set registry.general.title $PHRASEANET_PROJECT_NAME
echo "$FILE exists, skip setup."
+ bin/setup system:config set registry.general.title $PHRASEANET_PROJECT_NAME
+ if [[ $PHRASEANET_SMTP_ENABLED=true ]]; then
+ bin/setup system:config set registry.email.smtp-enabled $PHRASEANET_SMTP_ENABLED
+ bin/setup system:config set registry.email.smtp-auth-enabled $PHRASEANET_SMTP_AUTH_ENABLED
+ bin/setup system:config set registry.email.smtp-auth-secure-mode $PHRASEANET_SMTP_SECURE_MODE
+ bin/setup system:config set registry.email.smtp-auth-host $PHRASEANET_SMTP_HOST
+ bin/setup system:config set registry.email.smtp-auth-port $PHRASEANET_SMTP_PORT
+ bin/setup system:config set registry.email.smtp-user $PHRASEANET_SMTP_USER
+ bin/setup system:config set registry.email.smtp-password $PHRASEANET_SMTP_PASSWORD
+ bin/setup system:config set registry.email.emitter-email $PHRASEANET_EMITTER_EMAIL
+ bin/setup system:config set registry.email.prefix $PHRASEANET_MAIL_OBJECT_PREFIX
+ fi
+ bin/console user:password --user_id=1 --password $PHRASEANET_ADMIN_ACCOUNT_PASSWORD -y
else
echo "$FILE doesn't exist, entering setup..."
runuser app -c docker/phraseanet/auto-install.sh
diff --git a/lib/Alchemy/Phrasea/Model/Repositories/WorkerRunningJobRepository.php b/lib/Alchemy/Phrasea/Model/Repositories/WorkerRunningJobRepository.php
index a3b584058d..8d8655ec6a 100644
--- a/lib/Alchemy/Phrasea/Model/Repositories/WorkerRunningJobRepository.php
+++ b/lib/Alchemy/Phrasea/Model/Repositories/WorkerRunningJobRepository.php
@@ -102,4 +102,12 @@ class WorkerRunningJobRepository extends EntityRepository
{
return parent::getEntityManager();
}
+
+ public function reconnect()
+ {
+ if($this->_em->getConnection()->ping() === false) {
+ $this->_em->getConnection()->close();
+ $this->_em->getConnection()->connect();
+ }
+ }
}
diff --git a/lib/Alchemy/Phrasea/WorkerManager/Subscriber/RecordSubscriber.php b/lib/Alchemy/Phrasea/WorkerManager/Subscriber/RecordSubscriber.php
index d225a0c37a..c0df49717d 100644
--- a/lib/Alchemy/Phrasea/WorkerManager/Subscriber/RecordSubscriber.php
+++ b/lib/Alchemy/Phrasea/WorkerManager/Subscriber/RecordSubscriber.php
@@ -101,6 +101,9 @@ class RecordSubscriber implements EventSubscriberInterface
$repoWorker = $this->getRepoWorker();
$em = $repoWorker->getEntityManager();
+ // check connection an re-connect if needed
+ $repoWorker->reconnect();
+
$workerRunningJob = $repoWorker->findOneBy([
'databoxId' => $event->getRecord()->getDataboxId(),
'recordId' => $event->getRecord()->getRecordId(),
@@ -108,13 +111,15 @@ class RecordSubscriber implements EventSubscriberInterface
'workOn' => $event->getSubdefName()
]);
- $em->beginTransaction();
- try {
- $em->remove($workerRunningJob);
- $em->flush();
- $em->commit();
- } catch (\Exception $e) {
- $em->rollback();
+ if ($workerRunningJob) {
+ $em->beginTransaction();
+ try {
+ $em->remove($workerRunningJob);
+ $em->flush();
+ $em->commit();
+ } catch (\Exception $e) {
+ $em->rollback();
+ }
}
$this->messagePublisher->publishMessage(
@@ -223,6 +228,9 @@ class RecordSubscriber implements EventSubscriberInterface
$repoWorker = $this->getRepoWorker();
$em = $repoWorker->getEntityManager();
+ // check connection an re-connect if needed
+ $repoWorker->reconnect();
+
$workerRunningJob = $repoWorker->findOneBy([
'databoxId' => $event->getRecord()->getDataboxId(),
'recordId' => $event->getRecord()->getRecordId(),
@@ -230,13 +238,15 @@ class RecordSubscriber implements EventSubscriberInterface
'workOn' => $event->getSubdefName()
]);
- $em->beginTransaction();
- try {
- $em->remove($workerRunningJob);
- $em->flush();
- $em->commit();
- } catch (\Exception $e) {
- $em->rollback();
+ if ($workerRunningJob) {
+ $em->beginTransaction();
+ try {
+ $em->remove($workerRunningJob);
+ $em->flush();
+ $em->commit();
+ } catch (\Exception $e) {
+ $em->rollback();
+ }
}
$this->messagePublisher->publishMessage(
diff --git a/lib/Alchemy/Phrasea/WorkerManager/Worker/SubdefCreationWorker.php b/lib/Alchemy/Phrasea/WorkerManager/Worker/SubdefCreationWorker.php
index a05d8a1aa7..1bf324943f 100644
--- a/lib/Alchemy/Phrasea/WorkerManager/Worker/SubdefCreationWorker.php
+++ b/lib/Alchemy/Phrasea/WorkerManager/Worker/SubdefCreationWorker.php
@@ -81,6 +81,7 @@ class SubdefCreationWorker implements WorkerInterface
// tell that a file is in used to create subdef
$em = $this->repoWorker->getEntityManager();
+ $this->repoWorker->reconnect();
$em->beginTransaction();
try {
@@ -108,14 +109,28 @@ class SubdefCreationWorker implements WorkerInterface
try {
$this->subdefGenerator->generateSubdefs($record, $wantedSubdef);
} catch (\Exception $e) {
- $em->beginTransaction();
try {
+ $this->repoWorker->reconnect();
+ $em->getConnection()->beginTransaction();
$em->remove($workerRunningJob);
$em->flush();
$em->commit();
} catch (\Exception $e) {
- $em->rollback();
}
+ } catch (\Throwable $e) {
+ $count = isset($payload['count']) ? $payload['count'] + 1 : 2 ;
+ $workerMessage = "Exception throwable catched when create subdef for the recordID: " .$recordId;
+
+ $this->logger->error($workerMessage);
+
+ $this->dispatcher->dispatch(WorkerEvents::SUBDEFINITION_CREATION_FAILURE, new SubdefinitionCreationFailureEvent(
+ $record,
+ $payload['subdefName'],
+ $workerMessage,
+ $count
+ ));
+
+ return ;
}
// begin to check if the subdef is successfully generated
@@ -170,7 +185,8 @@ class SubdefCreationWorker implements WorkerInterface
$this->indexer->flushQueue();
// tell that we have finished to work on this file
- $em->beginTransaction();
+ $this->repoWorker->reconnect();
+ $em->getConnection()->beginTransaction();
try {
$workerRunningJob->setStatus(WorkerRunningJob::FINISHED);
$workerRunningJob->setFinished(new \DateTime('now'));
@@ -178,7 +194,17 @@ class SubdefCreationWorker implements WorkerInterface
$em->flush();
$em->commit();
} catch (\Exception $e) {
- $em->rollback();
+ try {
+ $em->getConnection()->beginTransaction();
+ $workerRunningJob->setStatus(WorkerRunningJob::FINISHED);
+ $em->persist($workerRunningJob);
+ $em->flush();
+ $em->commit();
+ } catch (\Exception $e) {
+ $this->messagePublisher->pushLog("rollback on recordID :" . $workerRunningJob->getRecordId());
+ $em->rollback();
+ }
+
}
}
}
diff --git a/lib/Alchemy/Phrasea/WorkerManager/Worker/WriteMetadatasWorker.php b/lib/Alchemy/Phrasea/WorkerManager/Worker/WriteMetadatasWorker.php
index 6c02078ac1..8ec819cb77 100644
--- a/lib/Alchemy/Phrasea/WorkerManager/Worker/WriteMetadatasWorker.php
+++ b/lib/Alchemy/Phrasea/WorkerManager/Worker/WriteMetadatasWorker.php
@@ -82,6 +82,7 @@ class WriteMetadatasWorker implements WorkerInterface
// tell that a file is in used to create subdef
$em = $this->getEntityManager();
+ $this->repoWorker->reconnect();
$em->beginTransaction();
try {
@@ -106,7 +107,24 @@ class WriteMetadatasWorker implements WorkerInterface
$record = $databox->get_record($recordId);
- $subdef = $record->get_subdef($payload['subdefName']);
+ try {
+ $subdef = $record->get_subdef($payload['subdefName']);
+ } catch (\Exception $e) {
+ $workerMessage = "Exception catched when try to get subdef " .$payload['subdefName']. " from DB for the recordID: " .$recordId;
+ $this->logger->error($workerMessage);
+
+ $count = isset($payload['count']) ? $payload['count'] + 1 : 2 ;
+
+ $this->dispatch(WorkerEvents::SUBDEFINITION_WRITE_META, new SubdefinitionWritemetaEvent(
+ $record,
+ $payload['subdefName'],
+ SubdefinitionWritemetaEvent::FAILED,
+ $workerMessage,
+ $count
+ ));
+
+ return ;
+ }
if ($subdef->is_physically_present()) {
$metadata = new MetadataBag();
@@ -245,6 +263,7 @@ class WriteMetadatasWorker implements WorkerInterface
// tell that we have finished to work on this file
+ $this->repoWorker->reconnect();
$em->beginTransaction();
try {
$workerRunningJob->setStatus(WorkerRunningJob::FINISHED);
diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml
index a42aea60a4..4013f8a44e 100644
--- a/lib/conf.d/configuration.yml
+++ b/lib/conf.d/configuration.yml
@@ -48,7 +48,7 @@ main:
_doctype:
limit: 10
_camera_model:
- limit: 0
+ limit: 10
_iso:
limit: 0
_aperture:
@@ -159,7 +159,7 @@ border-manager:
type: Checker\MediaType
enabled: false
options:
- mediatypes: [Audio, Document, Flash, Image, Video]
+ mediatypes: [Audio, Document, Image, Video]
user_account:
deleting_policies:
email_confirmation: true
@@ -244,7 +244,7 @@ embed_bundle:
video:
player: videojs
autoplay: false
- cover_subdef: thumbnail
+ cover_subdef: poster
message_start: StartOfMessage
available_speeds:
- 1
diff --git a/lib/conf.d/data_templates/DublinCore.xml b/lib/conf.d/data_templates/DublinCore.xml
index db3039df7f..ffd40733f8 100644
--- a/lib/conf.d/data_templates/DublinCore.xml
+++ b/lib/conf.d/data_templates/DublinCore.xml
@@ -8,7 +8,7 @@
1024
resample
72
- no
+ yes
75
yes
screen
@@ -90,6 +90,21 @@
+
+ {{datapathnoweb}}{{basename}}/subdefs
+ 1
+ 1280
+ image
+ yes
+ screen
+ 72
+ yes
+ yes
+ 75
+ jpeg
+
+
+
{{datapathnoweb}}{{basename}}/subdefs
748
@@ -102,8 +117,30 @@
25
25
libvpx
-
-
+
+
+ {{datapathnoweb}}{{basename}}/subview
+ no
+ audio
+ 128
+ 8000
+ pcm_s16le
+ mono
+ all
+
+
+
+
+ {{datapathnoweb}}{{basename}}/subview
+ no
+ audio
+ 180
+ 44100
+ libmp3lame
+
+ all
+
+
@@ -155,30 +192,6 @@
-
-
- {{datapathnoweb}}{{basename}}/subdefs
- image
- 240
- no
- resample
- 72
- screen
-
-
-
-
- {{datapathnoweb}}{{basename}}/subdefs
- image
- 800
- no
- resample
- 72
- screen
-
-
-
-
@@ -199,9 +212,13 @@
-
-
-
+
+
+
+
+
+
+