Merge pull request #7191 from JakubOnderka/create-no-need

fix: [internal] Remove unnecessary create call
pull/7199/head
Jakub Onderka 2021-03-11 12:14:16 +01:00 committed by GitHub
commit d989759211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -169,7 +169,7 @@ class EventShell extends AppShell
$this->ConfigLoad->execute();
$timeStart = time();
$userId = $this->args[0];
$user = $this->User->getAuthUser($userId);
$user = $this->getUser($userId);
$id = $this->args[1];
$this->Job->id = $id;
$this->Job->saveField('progress', 1);
@ -316,7 +316,6 @@ class EventShell extends AppShell
}
$this->Job->save($job);
$log = ClassRegistry::init('Log');
$log->create();
$log->createLogEntry($user, 'publish', 'Event', $id, 'Event (' . $id . '): published.', 'published () => (1)');
}
@ -340,7 +339,6 @@ class EventShell extends AppShell
}
$this->Job->save($job);
$log = ClassRegistry::init('Log');
$log->create();
$log->createLogEntry($user, 'publish_sightings', 'Event', $id, 'Sightings for event (' . $id . '): published.', 'publish_sightings updated');
}
@ -364,7 +362,6 @@ class EventShell extends AppShell
}
$this->Job->save($job);
$log = ClassRegistry::init('Log');
$log->create();
$log->createLogEntry($user, 'publish', 'GalaxyCluster', $clusterId, 'GalaxyCluster (' . $clusterId . '): published.', 'published () => (1)');
}
@ -416,7 +413,6 @@ class EventShell extends AppShell
echo $job['Job']['message'] . PHP_EOL;
$this->Job->save($job);
$log = ClassRegistry::init('Log');
$log->create();
$log->createLogEntry($user, 'enrichment', 'Event', $eventId, 'Event (' . $eventId . '): enriched.', 'enriched () => (1)');
}