-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from ConductionNL/feature/CONNECTOR-150/joblogs
Fixes on jobs and log cleanup
- Loading branch information
Showing
6 changed files
with
104 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ The OpenConnector Nextcloud app provides a ESB-framework to work together in an | |
- 🆓 Map and translate API calls | ||
]]></description> | ||
<version>0.1.20</version> | ||
<version>0.1.21</version> | ||
<licence>agpl</licence> | ||
<category>integration</category> | ||
<author mail="[email protected]" homepage="https://www.conduction.nl/">Conduction</author> | ||
|
@@ -33,6 +33,10 @@ The OpenConnector Nextcloud app provides a ESB-framework to work together in an | |
<owncloud max-version="0" min-version="0"/> | ||
</dependencies> | ||
|
||
<background-jobs> | ||
<job>OCA\OpenConnector\Cron\LogCleanUpTask</job> | ||
</background-jobs> | ||
|
||
<navigations> | ||
<navigation> | ||
<id>openconnector</id> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OCA\OpenConnector\Migration; | ||
|
||
use Closure; | ||
use OCP\DB\ISchemaWrapper; | ||
use OCP\DB\Types; | ||
use OCP\Migration\IOutput; | ||
use OCP\Migration\SimpleMigrationStep; | ||
|
||
/** | ||
* FIXME Auto-generated migration step: Please modify to your needs! | ||
*/ | ||
class Version1Date20241206095007 extends SimpleMigrationStep { | ||
|
||
/** | ||
* @param IOutput $output | ||
* @param Closure(): ISchemaWrapper $schemaClosure | ||
* @param array $options | ||
*/ | ||
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { | ||
} | ||
|
||
/** | ||
* @param IOutput $output | ||
* @param Closure(): ISchemaWrapper $schemaClosure | ||
* @param array $options | ||
* @return null|ISchemaWrapper | ||
*/ | ||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { | ||
/** | ||
* @var ISchemaWrapper $schema | ||
*/ | ||
$schema = $schemaClosure(); | ||
|
||
if ($schema->hasTable('openconnector_sources') === true) { | ||
$table = $schema->getTable('openconnector_sources'); | ||
|
||
if ($table->hasColumn('logRetention') === true) { | ||
$table->dropColumn('logRetention'); | ||
$table->addColumn('log_retention', Types::INTEGER)->setNotnull(false)->setDefault(3600); | ||
} | ||
if ($table->hasColumn('errorRetention') === true) { | ||
$table->dropColumn('errorRetention'); | ||
$table->addColumn('error_retention', Types::INTEGER)->setNotnull(false)->setDefault(86400); | ||
} | ||
} | ||
|
||
return $schema; | ||
} | ||
|
||
/** | ||
* @param IOutput $output | ||
* @param Closure(): ISchemaWrapper $schemaClosure | ||
* @param array $options | ||
*/ | ||
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters