Hi,

I have found if I uninstall the job scheduler module, then it does not delete the variables created by job scheduler module.
These variables are unused if we are not using job_scheduler anymore.

Needs to create a patch for the same.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RavindraSingh’s picture

Title: Doesn't remove the variables on install. » Doesn't remove the variables on uninstall.
RavindraSingh’s picture

Issue summary: View changes
RavindraSingh’s picture

Implemented patch for the issue

/*
* Implementation hook_uninstall().
*/
function job_scheduler_uninstall() {
db_query("DELETE FROM {variable} WHERE name LIKE 'job_scheduler%'");
}

vivekguptakota’s picture

Assigned: RavindraSingh » Unassigned
FileSize
309 bytes

You can also add following code in .install file

/*
* Implements hook_uninstall().
*/
function job_scheduler_uninstall() {
variable_del('job_scheduler_rebuild_all');
}

RavindraSingh’s picture

job scheduler generates variables dynamically. if you might have observed it with feeds module to adding importer id so variable_del('job_scheduler_rebuild_all'); is not sufficient.

JobScheduler.inc:      $class = variable_get('job_scheduler_class_'. $name, 'JobScheduler');
job_scheduler.module:  if (variable_get('job_scheduler_rebuild_all', FALSE)) {
 job_scheduler.module:  if (variable_get('job_scheduler_rebuild_all', FALSE)) {
contrib/job_scheduler]$grep variable_set -r *
job_scheduler.module:    variable_set('job_scheduler_rebuild_all', FALSE);
job_scheduler.module:  variable_set('job_scheduler_rebuild_all', TRUE);
I have considered and tested to use 
db_query("DELETE FROM {variable} WHERE name LIKE 'job_scheduler%'");
RavindraSingh’s picture

Status: Active » Reviewed & tested by the community

  • webflo committed 9baaba6 on 7.x-2.x
    Issue #2342589 by RavindraSingh, vivekguptakota, webflo: Remove...
webflo’s picture

Status: Reviewed & tested by the community » Fixed

Thanks! Merged both patches on commit.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.