mage-mzax / emarketing

Magento extension to create automated marketing campaigns that run for a set period of time and target customers determined by multiple filters.
Open Software License 3.0
26 stars 15 forks source link

Data base growing #14

Open rafatedeschi opened 7 years ago

rafatedeschi commented 7 years ago

Hi

The table "avmzax_emarketing_email_outbox"is accumulating too many data and getting too big..

I've seen a cron code to clean the body of the messages, but it's seem to work on test mode only!

It would help a lot if we could aslo use it to clean the of real emails too..... Or maybe have a function on backend to manually clean the body of the messages wwe want (eg. clean body of from x date to y date)

I'm not a developer, so I may have said some thing wrong!

cheers!

jsiefer commented 7 years ago

Hi @rafatedeschi Yes you right there is cleaning/purging function but its not being triggered yet.

https://github.com/mage-mzax/emarketing/blob/master/src/module/app/code/community/Mzax/Emarketing/Model/Observer/Cron.php#L254

You can add it if you want at: https://github.com/mage-mzax/emarketing/blob/master/src/module/app/code/community/Mzax/Emarketing/etc/config.xml

<mzax_emarketing_purge>
                <schedule><cron_expr>0 2 * * *</cron_expr></schedule>
                <run><model>mzax_emarketing/observer_cron::purge</model></run>
</mzax_emarketing_purge>
rafatedeschi commented 7 years ago

Hi

How will that work? For how long will it keep the emails before purging them?