From a64a66912f6c6855e08b70b6cfbd8d75e216e5fd Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 22 Sep 2021 15:38:20 +0300 Subject: [PATCH] renaming 4 --- application/Espo/Core/Console/Commands/RunJob.php | 2 +- application/Espo/Core/Job/AbstractGroupJob.php | 2 ++ application/Espo/Core/Job/Job.php | 2 ++ application/Espo/Core/Job/{ => Job}/Data.php | 2 +- application/Espo/Core/Job/{ => Job}/Status.php | 2 +- application/Espo/Core/Job/JobRunner.php | 3 +++ application/Espo/Core/Job/JobScheduler.php | 3 ++- application/Espo/Core/Job/QueueProcessor.php | 2 ++ application/Espo/Core/Job/QueueUtil.php | 2 ++ application/Espo/Core/Job/ScheduleProcessor.php | 2 ++ application/Espo/Jobs/CheckEmailAccounts.php | 4 ++-- application/Espo/Jobs/CheckInboundEmails.php | 4 ++-- application/Espo/Repositories/ScheduledJob.php | 2 +- .../Tools/EmailNotification/Jobs/NotifyAboutAssignment.php | 2 +- application/Espo/Tools/Import/Jobs/RunIdle.php | 2 +- application/Espo/Tools/Stream/Jobs/AutoFollow.php | 2 +- application/Espo/Tools/Stream/Jobs/ControlFollowers.php | 2 +- tests/integration/Espo/Core/Job/JobTest.php | 2 +- tests/integration/testClasses/Job/Job.php | 2 +- tests/unit/Espo/Core/Job/DataTest.php | 2 +- tests/unit/Espo/Core/Job/JobSchedulerTest.php | 2 +- tests/unit/testClasses/Core/Job/TestJob.php | 2 +- 22 files changed, 32 insertions(+), 18 deletions(-) rename application/Espo/Core/Job/{ => Job}/Data.php (99%) rename application/Espo/Core/Job/{ => Job}/Status.php (98%) diff --git a/application/Espo/Core/Console/Commands/RunJob.php b/application/Espo/Core/Console/Commands/RunJob.php index 92ee75a9c3..b9e2b77b10 100644 --- a/application/Espo/Core/Console/Commands/RunJob.php +++ b/application/Espo/Core/Console/Commands/RunJob.php @@ -36,7 +36,7 @@ use Espo\Core\{ }; use Espo\Core\Job\JobManager; -use Espo\Core\Job\Status; +use Espo\Core\Job\Job\Status; use Espo\Core\Utils\Util; use Espo\ORM\EntityManager; diff --git a/application/Espo/Core/Job/AbstractGroupJob.php b/application/Espo/Core/Job/AbstractGroupJob.php index ecb1f57cb0..5ef55fd340 100644 --- a/application/Espo/Core/Job/AbstractGroupJob.php +++ b/application/Espo/Core/Job/AbstractGroupJob.php @@ -31,6 +31,8 @@ namespace Espo\Core\Job; use Espo\Core\Utils\DateTime; use Espo\Core\Utils\Config; +use Espo\Core\Job\Job\Data; +use Espo\Core\Job\Job\Status; use Espo\ORM\EntityManager; diff --git a/application/Espo/Core/Job/Job.php b/application/Espo/Core/Job/Job.php index 72906399cd..dcfe9d1afd 100644 --- a/application/Espo/Core/Job/Job.php +++ b/application/Espo/Core/Job/Job.php @@ -29,6 +29,8 @@ namespace Espo\Core\Job; +use Espo\Core\Job\Job\Data; + /** * A job. */ diff --git a/application/Espo/Core/Job/Data.php b/application/Espo/Core/Job/Job/Data.php similarity index 99% rename from application/Espo/Core/Job/Data.php rename to application/Espo/Core/Job/Job/Data.php index 6472fffeae..9ca8c7af29 100644 --- a/application/Espo/Core/Job/Data.php +++ b/application/Espo/Core/Job/Job/Data.php @@ -27,7 +27,7 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -namespace Espo\Core\Job; +namespace Espo\Core\Job\Job; use Espo\Core\Utils\ObjectUtil; diff --git a/application/Espo/Core/Job/Status.php b/application/Espo/Core/Job/Job/Status.php similarity index 98% rename from application/Espo/Core/Job/Status.php rename to application/Espo/Core/Job/Job/Status.php index 6319891e85..136ffff6e6 100644 --- a/application/Espo/Core/Job/Status.php +++ b/application/Espo/Core/Job/Job/Status.php @@ -27,7 +27,7 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -namespace Espo\Core\Job; +namespace Espo\Core\Job\Job; class Status { diff --git a/application/Espo/Core/Job/JobRunner.php b/application/Espo/Core/Job/JobRunner.php index a7c954ae80..ebb8df9f96 100644 --- a/application/Espo/Core/Job/JobRunner.php +++ b/application/Espo/Core/Job/JobRunner.php @@ -38,6 +38,9 @@ use Espo\Core\{ Utils\DateTime as DateTimeUtil, }; +use Espo\Core\Job\Job\Data; +use Espo\Core\Job\Job\Status; + use Espo\Entities\Job as JobEntity; use Throwable; diff --git a/application/Espo/Core/Job/JobScheduler.php b/application/Espo/Core/Job/JobScheduler.php index 3823145c9a..b0cfd9c233 100644 --- a/application/Espo/Core/Job/JobScheduler.php +++ b/application/Espo/Core/Job/JobScheduler.php @@ -32,6 +32,7 @@ namespace Espo\Core\Job; use Espo\ORM\EntityManager; use Espo\Core\Utils\DateTime; +use Espo\Core\Job\Job\Data; use Espo\Entities\Job as JobEntity; @@ -180,7 +181,7 @@ class JobScheduler $time = $time->add($this->delay); } - $data = $this->data ?? Data::create(); + $data = $this->data ?? Data::create(); return $this->entityManager->createEntity(JobEntity::ENTITY_TYPE, [ 'name' => $this->className, diff --git a/application/Espo/Core/Job/QueueProcessor.php b/application/Espo/Core/Job/QueueProcessor.php index 502319cef7..6c7d1492d3 100644 --- a/application/Espo/Core/Job/QueueProcessor.php +++ b/application/Espo/Core/Job/QueueProcessor.php @@ -39,6 +39,8 @@ use Espo\{ Entities\Job as JobEntity, }; +use Espo\Core\Job\Job\Status; + use Spatie\Async\Pool as AsyncPool; class QueueProcessor diff --git a/application/Espo/Core/Job/QueueUtil.php b/application/Espo/Core/Job/QueueUtil.php index a16f2c3532..e43f184e95 100644 --- a/application/Espo/Core/Job/QueueUtil.php +++ b/application/Espo/Core/Job/QueueUtil.php @@ -36,6 +36,8 @@ use Espo\Core\{ Utils\DateTime as DateTimeUtil, }; +use Espo\Core\Job\Job\Status; + use Espo\Entities\Job as JobEntity; use Espo\ORM\Collection; diff --git a/application/Espo/Core/Job/ScheduleProcessor.php b/application/Espo/Core/Job/ScheduleProcessor.php index 8e950f3b9f..92c0422676 100644 --- a/application/Espo/Core/Job/ScheduleProcessor.php +++ b/application/Espo/Core/Job/ScheduleProcessor.php @@ -35,6 +35,8 @@ use Espo\Core\{ Utils\DateTime as DateTimeUtil, }; +use Espo\Core\Job\Job\Status; + use Espo\Entities\{ ScheduledJob as ScheduledJobEntity, Job as JobEntity, diff --git a/application/Espo/Jobs/CheckEmailAccounts.php b/application/Espo/Jobs/CheckEmailAccounts.php index f3327ccee4..886305b9f8 100644 --- a/application/Espo/Jobs/CheckEmailAccounts.php +++ b/application/Espo/Jobs/CheckEmailAccounts.php @@ -32,9 +32,9 @@ namespace Espo\Jobs; use Espo\Core\Exceptions\Error; use Espo\Core\{ - Job\Status, + Job\Job\Status, Job\JobPreparable, - Job\Data, + Job\Job\Data, Job\ScheduledJobData, ServiceFactory, ORM\EntityManager, diff --git a/application/Espo/Jobs/CheckInboundEmails.php b/application/Espo/Jobs/CheckInboundEmails.php index 5325d9d697..24e008b630 100644 --- a/application/Espo/Jobs/CheckInboundEmails.php +++ b/application/Espo/Jobs/CheckInboundEmails.php @@ -32,9 +32,9 @@ namespace Espo\Jobs; use Espo\Core\Exceptions\Error; use Espo\Core\{ - Job\Status, + Job\Job\Status, Job\JobPreparable, - Job\Data, + Job\Job\Data, Job\ScheduledJobData, ServiceFactory, ORM\EntityManager, diff --git a/application/Espo/Repositories/ScheduledJob.php b/application/Espo/Repositories/ScheduledJob.php index 7c4801e74d..689a0aa4af 100644 --- a/application/Espo/Repositories/ScheduledJob.php +++ b/application/Espo/Repositories/ScheduledJob.php @@ -31,7 +31,7 @@ namespace Espo\Repositories; use Espo\ORM\Entity; -use Espo\Core\Job\Status; +use Espo\Core\Job\Job\Status; class ScheduledJob extends \Espo\Core\Repositories\Database { diff --git a/application/Espo/Tools/EmailNotification/Jobs/NotifyAboutAssignment.php b/application/Espo/Tools/EmailNotification/Jobs/NotifyAboutAssignment.php index b87ca33069..805095b1e5 100644 --- a/application/Espo/Tools/EmailNotification/Jobs/NotifyAboutAssignment.php +++ b/application/Espo/Tools/EmailNotification/Jobs/NotifyAboutAssignment.php @@ -30,7 +30,7 @@ namespace Espo\Tools\EmailNotification\Jobs; use Espo\Core\Job\Job; -use Espo\Core\Job\Data; +use Espo\Core\Job\Job\Data; use Espo\Tools\EmailNotification\AssignmentProcessor; use Espo\Tools\EmailNotification\AssignmentProcessorData; diff --git a/application/Espo/Tools/Import/Jobs/RunIdle.php b/application/Espo/Tools/Import/Jobs/RunIdle.php index 7f09c66868..5227cc1745 100644 --- a/application/Espo/Tools/Import/Jobs/RunIdle.php +++ b/application/Espo/Tools/Import/Jobs/RunIdle.php @@ -30,7 +30,7 @@ namespace Espo\Tools\Import\Jobs; use Espo\Core\Job\Job; -use Espo\Core\Job\Data; +use Espo\Core\Job\Job\Data; use Espo\Core\Exceptions\Error; use Espo\Tools\Import\ImportFactory; diff --git a/application/Espo/Tools/Stream/Jobs/AutoFollow.php b/application/Espo/Tools/Stream/Jobs/AutoFollow.php index b6e73149e9..8dfb6ac135 100644 --- a/application/Espo/Tools/Stream/Jobs/AutoFollow.php +++ b/application/Espo/Tools/Stream/Jobs/AutoFollow.php @@ -30,7 +30,7 @@ namespace Espo\Tools\Stream\Jobs; use Espo\Core\Job\Job; -use Espo\Core\Job\Data; +use Espo\Core\Job\Job\Data; use Espo\Core\AclManager; use Espo\Core\Acl\Exceptions\NotImplemented as AclNotImplemented; diff --git a/application/Espo/Tools/Stream/Jobs/ControlFollowers.php b/application/Espo/Tools/Stream/Jobs/ControlFollowers.php index 2998456c78..f9b4a29d94 100644 --- a/application/Espo/Tools/Stream/Jobs/ControlFollowers.php +++ b/application/Espo/Tools/Stream/Jobs/ControlFollowers.php @@ -30,7 +30,7 @@ namespace Espo\Tools\Stream\Jobs; use Espo\Core\Job\Job; -use Espo\Core\Job\Data; +use Espo\Core\Job\Job\Data; use Espo\Core\AclManager; use Espo\Core\Acl\Exceptions\NotImplemented as AclNotImplemented; diff --git a/tests/integration/Espo/Core/Job/JobTest.php b/tests/integration/Espo/Core/Job/JobTest.php index 48a8eb6654..f5efd2465a 100644 --- a/tests/integration/Espo/Core/Job/JobTest.php +++ b/tests/integration/Espo/Core/Job/JobTest.php @@ -31,7 +31,7 @@ namespace tests\integration\Espo\Core\Job; use Espo\Core\{ Job\JobManager, - Job\Status, + Job\Job\Status, Job\JobSchedulerFactory, Job\QueueName, ORM\EntitManager, diff --git a/tests/integration/testClasses/Job/Job.php b/tests/integration/testClasses/Job/Job.php index 57f1afc328..b5f1108cb8 100644 --- a/tests/integration/testClasses/Job/Job.php +++ b/tests/integration/testClasses/Job/Job.php @@ -30,7 +30,7 @@ namespace tests\integration\testClasses\Job; use Espo\Core\Job\Job as JobInterface; -use Espo\Core\Job\Data; +use Espo\Core\Job\Job\Data; class Job implements JobInterface { diff --git a/tests/unit/Espo/Core/Job/DataTest.php b/tests/unit/Espo/Core/Job/DataTest.php index afbf299ade..d5f47358bf 100644 --- a/tests/unit/Espo/Core/Job/DataTest.php +++ b/tests/unit/Espo/Core/Job/DataTest.php @@ -29,7 +29,7 @@ namespace tests\unit\Espo\Core\Job; -use Espo\Core\Job\Data; +use Espo\Core\Job\Job\Data; class DataTest extends \PHPUnit\Framework\TestCase { diff --git a/tests/unit/Espo/Core/Job/JobSchedulerTest.php b/tests/unit/Espo/Core/Job/JobSchedulerTest.php index 3e2c361722..67b455992b 100644 --- a/tests/unit/Espo/Core/Job/JobSchedulerTest.php +++ b/tests/unit/Espo/Core/Job/JobSchedulerTest.php @@ -32,7 +32,7 @@ namespace tests\unit\Espo\Core\Job; use Espo\Core\Job\JobScheduler; use Espo\Core\Job\QueueName; use Espo\Core\Utils\DateTime; -use Espo\Core\Job\Data; +use Espo\Core\Job\Job\Data; use Espo\ORM\EntityManager; diff --git a/tests/unit/testClasses/Core/Job/TestJob.php b/tests/unit/testClasses/Core/Job/TestJob.php index bf54a3b7ba..5c972db2d3 100644 --- a/tests/unit/testClasses/Core/Job/TestJob.php +++ b/tests/unit/testClasses/Core/Job/TestJob.php @@ -30,7 +30,7 @@ namespace tests\unit\testClasses\Core\Job; use Espo\Core\Job\Job; -use Espo\Core\Job\Data; +use Espo\Core\Job\Job\Data; class TestJob implements Job {