mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge pull request #7936 from appwrite/feat-upgrade-platform-with-module
Use latest Platform and add Core module
This commit is contained in:
@@ -2,15 +2,13 @@
|
||||
|
||||
namespace Appwrite\Platform;
|
||||
|
||||
use Appwrite\Platform\Services\Tasks;
|
||||
use Appwrite\Platform\Services\Workers;
|
||||
use Appwrite\Platform\Modules\Core;
|
||||
use Utopia\Platform\Platform;
|
||||
|
||||
class Appwrite extends Platform
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->addService('tasks', new Tasks());
|
||||
$this->addService('workers', new Workers());
|
||||
parent::__construct(new Core());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules;
|
||||
|
||||
use Appwrite\Platform\Services\Tasks;
|
||||
use Appwrite\Platform\Services\Workers;
|
||||
use Utopia\Platform\Module;
|
||||
|
||||
class Core extends Module
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->addService('tasks', new Tasks());
|
||||
$this->addService('workers', new Workers());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,7 +22,7 @@ class Tasks extends Service
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->type = self::TYPE_CLI;
|
||||
$this->type = Service::TYPE_TASK;
|
||||
$this
|
||||
->addAction(Doctor::getName(), new Doctor())
|
||||
->addAction(Install::getName(), new Install())
|
||||
|
||||
@@ -20,7 +20,7 @@ class Workers extends Service
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->type = self::TYPE_WORKER;
|
||||
$this->type = Service::TYPE_WORKER;
|
||||
$this
|
||||
->addAction(Audits::getName(), new Audits())
|
||||
->addAction(Builds::getName(), new Builds())
|
||||
|
||||
Reference in New Issue
Block a user