cleanup
This commit is contained in:
@@ -35,8 +35,6 @@ use Espo\Core\{
|
||||
InjectableFactory,
|
||||
};
|
||||
|
||||
use TypeError;
|
||||
|
||||
class JobFactory
|
||||
{
|
||||
private $classFinder;
|
||||
@@ -70,19 +68,11 @@ class JobFactory
|
||||
* Create a job by class name.
|
||||
|
||||
* @return Job|JobDataLess
|
||||
* @throws Error
|
||||
*/
|
||||
public function createByClassName(string $className): object
|
||||
{
|
||||
$job = $this->injectableFactory->create($className);
|
||||
|
||||
/*if (
|
||||
!$job instanceof Job &&
|
||||
!$job instanceof JobDataLess
|
||||
) {
|
||||
throw new TypeError("{$className} should implement Job or JobDataLess interface.");
|
||||
}*/
|
||||
|
||||
return $job;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ use Espo\Core\{
|
||||
use Espo\Entities\Job as JobEntity;
|
||||
|
||||
use Throwable;
|
||||
use TypeError;
|
||||
|
||||
class JobRunner
|
||||
{
|
||||
@@ -222,13 +221,6 @@ class JobRunner
|
||||
*/
|
||||
private function runJob($job, JobEntity $jobEntity): void
|
||||
{
|
||||
/*if (
|
||||
!$job instanceof Job &&
|
||||
!$job instanceof JobDataLess
|
||||
) {
|
||||
throw new TypeError();
|
||||
}*/
|
||||
|
||||
$data = JobData::create($jobEntity->getData())
|
||||
->withTargetId($jobEntity->getTargetId())
|
||||
->withTargetType($jobEntity->getTargetType());
|
||||
|
||||
Reference in New Issue
Block a user