-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up
page_hits
table where date_hit
field is lower than --day…
…s-old.
- Loading branch information
Showing
8 changed files
with
154 additions
and
53 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
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 |
---|---|---|
@@ -1,54 +1,61 @@ | ||
<?php | ||
|
||
return [ | ||
$configValue = [ | ||
'name' => 'Housekeeping by Leuchtfeuer', | ||
'description' => 'Database Cleanup Command to delete lead_event_log table entries, campaign_lead_event_log table entries, email_stats table entries where the referenced email entry is currently not published and email_stats_devices table entries.', | ||
'version' => '3.1.0', | ||
'version' => '4.0.0', | ||
'author' => 'Leuchtfeuer Digital Marketing GmbH', | ||
'services' => [ | ||
'integrations' => [ | ||
'mautic.integration.housekeepingleuchtfeuer' => [ | ||
'class' => \MauticPlugin\LeuchtfeuerHousekeepingBundle\Integration\HousekeepingLeuchtfeuerIntegration::class, | ||
'tags' => [ | ||
'mautic.integration', | ||
'mautic.basic_integration', | ||
], | ||
]; | ||
|
||
if (version_compare(MAUTIC_VERSION, '5', '>=')) { | ||
return $configValue; | ||
} | ||
|
||
$configValue['services'] = [ | ||
'integrations' => [ | ||
'mautic.integration.housekeepingleuchtfeuer' => [ | ||
'class' => \MauticPlugin\LeuchtfeuerHousekeepingBundle\Integration\HousekeepingLeuchtfeuerIntegration::class, | ||
'tags' => [ | ||
'mautic.integration', | ||
'mautic.basic_integration', | ||
], | ||
'housekeepingleuchtfeuer.integration.configuration' => [ | ||
'class' => \MauticPlugin\LeuchtfeuerHousekeepingBundle\Integration\Support\ConfigSupport::class, | ||
'tags' => [ | ||
'mautic.config_integration', | ||
], | ||
], | ||
'housekeepingleuchtfeuer.integration.configuration' => [ | ||
'class' => \MauticPlugin\LeuchtfeuerHousekeepingBundle\Integration\Support\ConfigSupport::class, | ||
'tags' => [ | ||
'mautic.config_integration', | ||
], | ||
], | ||
'command' => [ | ||
'mautic.leuchtfeuer.command.housekeeping' => [ | ||
'class' => \MauticPlugin\LeuchtfeuerHousekeepingBundle\Command\EventLogCleanupCommand::class, | ||
'tag' => 'console.command', | ||
'arguments' => [ | ||
'mautic.leuchtfeuer.service.event_log_cleanup', | ||
], | ||
], | ||
'command' => [ | ||
'mautic.leuchtfeuer.command.housekeeping' => [ | ||
'class' => \MauticPlugin\LeuchtfeuerHousekeepingBundle\Command\EventLogCleanupCommand::class, | ||
'tag' => 'console.command', | ||
'arguments' => [ | ||
'mautic.leuchtfeuer.service.event_log_cleanup', | ||
], | ||
], | ||
'models' => [], | ||
'forms' => [], | ||
'helpers' => [], | ||
'other' => [ | ||
'mautic.leuchtfeuer.service.event_log_cleanup' => [ | ||
'class' => \MauticPlugin\LeuchtfeuerHousekeepingBundle\Service\EventLogCleanup::class, | ||
'arguments' => [ | ||
'database_connection', | ||
'%mautic.db_table_prefix%', | ||
'mautic.housekeepingleuchtfeuer.config', | ||
], | ||
], | ||
'models' => [], | ||
'forms' => [], | ||
'helpers' => [], | ||
'other' => [ | ||
'mautic.leuchtfeuer.service.event_log_cleanup' => [ | ||
'class' => \MauticPlugin\LeuchtfeuerHousekeepingBundle\Service\EventLogCleanup::class, | ||
'arguments' => [ | ||
'database_connection', | ||
'%mautic.db_table_prefix%', | ||
'mautic.housekeepingleuchtfeuer.config', | ||
], | ||
'mautic.housekeepingleuchtfeuer.config' => [ | ||
'class' => \MauticPlugin\LeuchtfeuerHousekeepingBundle\Integration\Config::class, | ||
'arguments' => [ | ||
'mautic.integrations.helper', | ||
], | ||
], | ||
'mautic.housekeepingleuchtfeuer.config' => [ | ||
'class' => \MauticPlugin\LeuchtfeuerHousekeepingBundle\Integration\Config::class, | ||
'arguments' => [ | ||
'mautic.integrations.helper', | ||
], | ||
], | ||
'parameters' => [], | ||
], | ||
'parameters' => [], | ||
]; | ||
|
||
return $configValue; |
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,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Mautic\CoreBundle\DependencyInjection\MauticCoreExtension; | ||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | ||
|
||
if (version_compare(MAUTIC_VERSION, '5', '<')) { | ||
return; | ||
} | ||
|
||
return static function (ContainerConfigurator $configurator): void { | ||
$services = $configurator->services() | ||
->defaults() | ||
->autowire() | ||
->autoconfigure() | ||
->public(); | ||
|
||
$services->load('MauticPlugin\\LeuchtfeuerHousekeepingBundle\\', '../') | ||
->exclude('../{'.implode(',', MauticCoreExtension::DEFAULT_EXCLUDES).'}'); | ||
|
||
$services->get(\MauticPlugin\LeuchtfeuerHousekeepingBundle\Integration\HousekeepingLeuchtfeuerIntegration::class) | ||
->tag('mautic.integration') | ||
->tag('mautic.basic_integration'); | ||
$services->get(\MauticPlugin\LeuchtfeuerHousekeepingBundle\Integration\Support\ConfigSupport::class) | ||
->tag('mautic.config_integration'); | ||
|
||
$services->alias('mautic.integration.housekeepingleuchtfeuer', \MauticPlugin\LeuchtfeuerHousekeepingBundle\Integration\HousekeepingLeuchtfeuerIntegration::class); | ||
|
||
$eventLogCleanup = $services->get(\MauticPlugin\LeuchtfeuerHousekeepingBundle\Service\EventLogCleanup::class); | ||
$eventLogCleanup->arg('$dbPrefix', '%mautic.db_table_prefix%'); | ||
}; |
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,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace MauticPlugin\LeuchtfeuerHousekeepingBundle\DependencyInjection; | ||
|
||
use Symfony\Component\Config\FileLocator; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Extension\Extension; | ||
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; | ||
|
||
class LeuchtfeuerHousekeepingExtension extends Extension | ||
{ | ||
/** | ||
* @param mixed[] $configs | ||
*/ | ||
public function load(array $configs, ContainerBuilder $container): void | ||
{ | ||
$loader = new PhpFileLoader($container, new FileLocator(__DIR__.'/../Config')); | ||
$loader->load('services.php'); | ||
} | ||
} |
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