This commit is contained in:
Yuri Kuznetsov
2021-08-12 12:19:57 +03:00
parent 1545305d43
commit 349cb32c5f
2 changed files with 0 additions and 18 deletions
-10
View File
@@ -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;
}
-8
View File
@@ -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());