Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Jobs/ImportTypeHttp.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function runImport(ImportFeed $importFeed, string $attachmentId, \stdClas
];

if (!empty($payload) && !empty($payload->executeNow)) {
$this->getImportTypeHttpJobCreator()->run($jobData);
$this->getImportTypeHttpJobCreator()->runNow($jobData);
} else {
$job = $this->getEntityManager()->getEntity('Job');
$job->set([
Expand Down
11 changes: 8 additions & 3 deletions app/Jobs/ImportTypeHttpJobCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,18 @@ class ImportTypeHttpJobCreator extends AbstractJob implements JobInterface
protected ?string $importJobCreatorId = null;

public function run(Job $job): void
{
$this->runNow($job->getPayload(), $job);
}

public function runNow(array $data, ?Job $job = null): void
{
$GLOBALS['skipAssignmentNotifications'] = true;
$GLOBALS['skipHooks'] = true;

$this->importJobCreatorId = $job->get('id');

$data = $job->getPayload();
if (!empty($job)) {
$this->importJobCreatorId = $job->get('id');
}

if (empty($data['importFeedId'])) {
throw new BadRequest('ImportFeedId is required.');
Expand Down