Clean up of removed (deprecated) code
After this issue: https://github.com/dotCMS/core/issues/10402 we are having FATAL errors on clients environments, because there are references to some of the classes removed. For example this client had problems with DeliverCampaign job. Doing a quick search I could find some of the places where we still use the logic removed Example 1, Example 2.
Also, we need to make sure clients coming from previous versions (using those jobs removed) don't have the jobs in the quartz tables, etc. (Upgrade Task)
Client ticket: https://my.dotcms.com/tickets/detail.dot?id=7e6c49a1-93f0-43e2-b1f7-185d6897f499
Known Workarounds
in this case (DeliverCampaignJob):
DELETE FROM qrtz_excl_cron_triggers WHERE trigger_name IN (SELECT trigger_name FROM qrtz_excl_triggers WHERE job_name = 'DeliverCampaignJob');
DELETE FROM qrtz_excl_triggers WHERE job_name = 'DeliverCampaignJob';
DELETE FROM qrtz_excl_job_details WHERE job_name = 'DeliverCampaignJob';
I believe we need an upgrade task that deletes all old jobs and triggers. The ones that matter get rebuilt on startup anyway
Yeah @oarrietadotcms suggested doing so in the description
Passed QA. Tested with started data and doing upgrade from 3.6.0 to 4.1.0 using clients' data No errors are showing in regards to old classes. Tested on master-4.1 / commit 6caf33e Mac OS 10.10 / MySQL 5.6.35 / Firefox v45.0.1 / Tomcat 8 / Java 8