Projet

Général

Profil

Révision 6ff32cea

Ajouté par Florent Torregrosa il y a environ 9 ans

Update core to 7.36

Voir les différences:

drupal7/modules/system/system.api.php
606 606
 * @return
607 607
 *   An associative array where the key is the queue name and the value is
608 608
 *   again an associative array. Possible keys are:
609
 *   - 'worker callback': The name of the function to call. It will be called
610
 *     with one argument, the item created via DrupalQueue::createItem().
609
 *   - 'worker callback': A PHP callable to call that is an implementation of
610
 *     callback_queue_worker().
611 611
 *   - 'time': (optional) How much time Drupal should spend on calling this
612 612
 *     worker in seconds. Defaults to 15.
613 613
 *   - 'skip on cron': (optional) Set to TRUE to avoid being processed during
......
643 643
  $queues['aggregator_feeds']['time'] = 90;
644 644
}
645 645

  
646
/**
647
 * Work on a single queue item.
648
 *
649
 * Callback for hook_queue_info().
650
 *
651
 * @param $queue_item_data
652
 *   The data that was passed to DrupalQueue::createItem() when the item was
653
 *   queued.
654
 *
655
 * @throws \Exception
656
 *   The worker callback may throw an exception to indicate there was a problem.
657
 *   The cron process will log the exception, and leave the item in the queue to
658
 *   be processed again later.
659
 *
660
 * @see drupal_cron_run()
661
 */
662
function callback_queue_worker($queue_item_data) {
663
  $node = node_load($queue_item_data);
664
  $node->title = 'Updated title';
665
  $node->save();
666
}
667

  
646 668
/**
647 669
 * Allows modules to declare their own Form API element types and specify their
648 670
 * default values.
......
1890 1912
/**
1891 1913
 * Define image toolkits provided by this module.
1892 1914
 *
1893
 * The file which includes each toolkit's functions must be declared as part of
1894
 * the files array in the module .info file so that the registry will find and
1895
 * parse it.
1915
 * The file which includes each toolkit's functions must be included in this
1916
 * hook.
1896 1917
 *
1897 1918
 * The toolkit's functions must be named image_toolkitname_operation().
1898 1919
 * where the operation may be:

Formats disponibles : Unified diff