refactor module
This commit is contained in:
parent
ec69507818
commit
131de2ea7a
3 changed files with 9 additions and 5 deletions
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
namespace Appwrite\Platform;
|
namespace Appwrite\Platform;
|
||||||
|
|
||||||
use Appwrite\Platform\Services\Tasks;
|
|
||||||
use Appwrite\Platform\Services\Workers;
|
|
||||||
use Appwrite\Platform\Modules\Core;
|
use Appwrite\Platform\Modules\Core;
|
||||||
use Utopia\Platform\Platform;
|
use Utopia\Platform\Platform;
|
||||||
|
|
||||||
|
@ -12,7 +10,5 @@ class Appwrite extends Platform
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct(new Core());
|
parent::__construct(new Core());
|
||||||
$this->addService('tasks', new Tasks());
|
|
||||||
$this->addService('workers', new Workers());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,16 @@
|
||||||
|
|
||||||
namespace Appwrite\Platform\Modules;
|
namespace Appwrite\Platform\Modules;
|
||||||
|
|
||||||
|
use Appwrite\Platform\Services\Tasks;
|
||||||
|
use Appwrite\Platform\Services\Workers;
|
||||||
use Utopia\Platform\Module;
|
use Utopia\Platform\Module;
|
||||||
|
|
||||||
class Core extends Module
|
class Core extends Module
|
||||||
{
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->addService('tasks', new Tasks());
|
||||||
|
$this->addService('workers', new Workers());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ class Workers extends Service
|
||||||
{
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->type = self::TYPE_WORKER;
|
$this->type = Service::TYPE_WORKER;
|
||||||
$this
|
$this
|
||||||
->addAction(Audits::getName(), new Audits())
|
->addAction(Audits::getName(), new Audits())
|
||||||
->addAction(Builds::getName(), new Builds())
|
->addAction(Builds::getName(), new Builds())
|
||||||
|
|
Loading…
Reference in a new issue