aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/TaskProcessing/Db/Task.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/TaskProcessing/Db/Task.php')
-rw-r--r--lib/private/TaskProcessing/Db/Task.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/private/TaskProcessing/Db/Task.php b/lib/private/TaskProcessing/Db/Task.php
index 1ac40327899..9fc999faf1a 100644
--- a/lib/private/TaskProcessing/Db/Task.php
+++ b/lib/private/TaskProcessing/Db/Task.php
@@ -35,6 +35,10 @@ use OCP\TaskProcessing\Task as OCPTask;
* @method null|string getErrorMessage()
* @method setProgress(null|float $progress)
* @method null|float getProgress()
+ * @method setWebhookUri(string $webhookUri)
+ * @method string getWebhookUri()
+ * @method setWebhookMethod(string $webhookMethod)
+ * @method string getWebhookMethod()
*/
class Task extends Entity {
protected $lastUpdated;
@@ -48,16 +52,18 @@ class Task extends Entity {
protected $completionExpectedAt;
protected $errorMessage;
protected $progress;
+ protected $webhookUri;
+ protected $webhookMethod;
/**
* @var string[]
*/
- public static array $columns = ['id', 'last_updated', 'type', 'input', 'output', 'status', 'user_id', 'app_id', 'custom_id', 'completion_expected_at', 'error_message', 'progress'];
+ public static array $columns = ['id', 'last_updated', 'type', 'input', 'output', 'status', 'user_id', 'app_id', 'custom_id', 'completion_expected_at', 'error_message', 'progress', 'webhook_uri', 'webhook_method'];
/**
* @var string[]
*/
- public static array $fields = ['id', 'lastUpdated', 'type', 'input', 'output', 'status', 'userId', 'appId', 'customId', 'completionExpectedAt', 'errorMessage', 'progress'];
+ public static array $fields = ['id', 'lastUpdated', 'type', 'input', 'output', 'status', 'userId', 'appId', 'customId', 'completionExpectedAt', 'errorMessage', 'progress', 'webhookUri', 'webhookMethod'];
public function __construct() {
@@ -74,6 +80,8 @@ class Task extends Entity {
$this->addType('completionExpectedAt', 'datetime');
$this->addType('errorMessage', 'string');
$this->addType('progress', 'float');
+ $this->addType('webhookUri', 'string');
+ $this->addType('webhookMethod', 'string');
}
public function toRow(): array {
@@ -97,6 +105,8 @@ class Task extends Entity {
'customId' => $task->getCustomId(),
'completionExpectedAt' => $task->getCompletionExpectedAt(),
'progress' => $task->getProgress(),
+ 'webhookUri' => $task->getWebhookUri(),
+ 'webhookMethod' => $task->getWebhookMethod(),
]);
return $taskEntity;
}
@@ -114,6 +124,8 @@ class Task extends Entity {
$task->setCompletionExpectedAt($this->getCompletionExpectedAt());
$task->setErrorMessage($this->getErrorMessage());
$task->setProgress($this->getProgress());
+ $task->setWebhookUri($this->getWebhookUri());
+ $task->setWebhookMethod($this->getWebhookMethod());
return $task;
}
}