use workerrunningjob for uploader and populate

This commit is contained in:
aynsix
2020-07-21 15:12:03 +03:00
parent 2b8581d226
commit bea001c4b7
20 changed files with 344 additions and 613 deletions

View File

@@ -63,9 +63,6 @@ class WriteMetadatasWorker implements WorkerInterface
$clearDoc = isset($payload['clearDoc']) ? $payload['clearDoc'] : false;
$databox = $this->findDataboxById($databoxId);
$param = ($payload['subdefName'] == "document") ? PhraseaTokens::WRITE_META_DOC : PhraseaTokens::WRITE_META_SUBDEF;
// check if there is a make subdef running for the record or the same task running
$canWriteMeta = $this->repoWorker->canWriteMetadata($payload['subdefName'], $recordId, $databoxId);
@@ -91,7 +88,7 @@ class WriteMetadatasWorker implements WorkerInterface
$workerRunningJob
->setDataboxId($databoxId)
->setRecordId($recordId)
->setWork($param)
->setWork(MessagePublisher::WRITE_METADATAS_TYPE)
->setWorkOn($payload['subdefName'])
->setPublished($date->setTimestamp($payload['published']))
->setStatus(WorkerRunningJob::RUNNING)