DrupalQueue worker callback in separate file This is my first time using the DrupalQueue class, and I have two questions.

Does hook_cron_queue_info() HAVE to go in my mymodule.module file? I had some weird behavior before finally trying that, and it seems to be the culprit.

Can I put the queue worker callback in a separate file? I'm trying to keep all my queue functions in their own file, but it doesn't seem like I can do a file attribute like with a lot of other callback types; I just keep getting function undefined errors.

I tried...

function mymodule_cron_queue_info() {
  $queues['autopilot'] = array(
    'time' =&gt; 60,
    'worker callback' =&gt; '_mymodule_queue_handler',
    'file' =&gt; array('type' =&gt; 'inc', 'module' =&gt; 'mymodule', 'name' =&gt; 'includes/mymodule.queue'),
  );
  return $queues;
}


and

function mymodule_cron_queue_info() {
 module_load_include('module', 'mymodule', 'includes/mymodule.queue.inc');
  $queues['autopilot'] = array(
    'time' =&gt; 60,
    'worker callback' =&gt; '_mymodule_queue_handler',
  );
  return $queues;
}


but neither seem to work.
I was looking for this too. Turns out that it is not supported, judging from source in drupal_cron_run(). If your queue worker is sizable, one option is to create an intermediary worker callback in your .module file, then include and execute the mymodule.queue.inc worker from that function.