Skip to content

Commit

Permalink
https://github.com/thehcginstitute-com/m1/issues/590
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed May 2, 2024
1 parent 78b0745 commit fa13bef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 0 additions & 6 deletions app/code/community/Ebizmarts/MailChimp/Model/Cron.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
# 2024-04-14 Dmitrii Fediuk https://upwork.com/fl/mage2pro
# "Refactor the `Ebizmarts_MailChimp` module": https://github.com/thehcginstitute-com/m1/issues/524
use Ebizmarts_MailChimp_Model_ProcessWebhook as Process;
class Ebizmarts_MailChimp_Model_Cron
{
/**
Expand All @@ -22,11 +21,6 @@ function syncEcommerceBatchData() {\HCG\MailChimp\Batch\Commerce::p();}
*/
function syncSubscriberBatchData():void {\HCG\MailChimp\Batch\Subscriber::p();}

function deleteWebhookRequests() {
$p = new Process; /** @var Process $p */
$p->deleteProcessed();
}

function clearEcommerceData()
{
Mage::getModel('mailchimp/clearEcommerce')->clearEcommerceData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ function __construct() {
$this->_interestGroupHandle = Mage::getModel('mailchimp/api_subscribers_InterestGroupHandle');
}

/**
* 2024-05-02 Dmitrii Fediuk https://upwork.com/fl/mage2pro
* "Refactor `Ebizmarts_MailChimp_Model_ProcessWebhook`": https://github.com/cabinetsbay/site/issues/590
* @used-by Aoe_Scheduler_Model_Observer::dispatch() (app/code/community/Ebizmarts/MailChimp/etc/config.xml)
*/
function deleteProcessed():void {
$helper = $this->getHelper();
$resource = $helper->getCoreResource();
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Ebizmarts/MailChimp/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ https://github.com/thehcginstitute-com/m1/issues/573 -->
<cron_expr>0 0 * * *</cron_expr>
</schedule>
<run>
<model>mailchimp/cron::deleteWebhookRequests</model>
<model>Ebizmarts_MailChimp_Model_ProcessWebhook::deleteProcessed</model>
</run>
<groups>ebizmarts_mailchimp</groups>
</mailchimp_delete_webhook_processed>
Expand Down

0 comments on commit fa13bef

Please sign in to comment.