Last active
August 29, 2015 14:20
-
-
Save rscotton/78e49a96b15acb43de42 to your computer and use it in GitHub Desktop.
An example of Drupal's hook_cron_queue_info() in action.
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
<?php | |
function profile_cron_queue_info() { | |
$queues = array( | |
'import_profiles' => array( | |
'worker callback' => 'profile_import_profiles’, | |
'time' => 60*30, //Give a max of 30 minutes per import, this is a large job! | |
), | |
'active_status_sync' => array( | |
'worker callback' => 'profile_active_status_sync', | |
'time' => 60*10, //Give 10 minutes for this, it is less time consuming | |
), | |
); | |
return $queues; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment