/[drupal]/drupal/modules/system/system.queue.inc
ViewVC logotype

Log of /drupal/modules/system/system.queue.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Tag:

Revision 1.7 - (view) (download) (as text) (annotate) - [select for diffs]
Sat Oct 31 13:53:48 2009 UTC (4 weeks ago) by dries
Branch: MAIN
CVS Tags: DRUPAL-7-0-UNSTABLE-10, HEAD
Changes since 1.6: +1 -10 lines
Diff to previous 1.6
- Patch #602306 by alex_b: removed some unused code.

Revision 1.6 - (view) (download) (as text) (annotate) - [select for diffs]
Wed Oct 14 10:59:15 2009 UTC (6 weeks, 3 days ago) by dries
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5
- Patch #602306 by David Strauss, Damien Tournoud: Fixed bug in the default queue implementation.

Revision 1.5 - (view) (download) (as text) (annotate) - [select for diffs]
Mon Oct 12 15:40:04 2009 UTC (6 weeks, 4 days ago) by dries
Branch: MAIN
Changes since 1.4: +13 -19 lines
Diff to previous 1.4
- Patch #602306 by chx: simplify the default queue implementation.

Revision 1.4 - (view) (download) (as text) (annotate) - [select for diffs]
Sat Oct 10 13:32:01 2009 UTC (7 weeks ago) by dries
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3
- Patch #391340 by dww: documentation clean-up and correction.

Revision 1.3 - (view) (download) (as text) (annotate) - [select for diffs]
Fri Sep 18 00:04:23 2009 UTC (2 months, 1 week ago) by webchick
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2
#564394 by Berdir and Crell: Removed database BC layer. nah nah nah nah... hey hey hey... gooood byeeee...

Revision 1.2 - (view) (download) (as text) (annotate) - [select for diffs]
Sun May 24 17:39:34 2009 UTC (6 months ago) by dries
Branch: MAIN
CVS Tags: DRUPAL-7-0-UNSTABLE-7, DRUPAL-7-0-UNSTABLE-8, DRUPAL-7-0-UNSTABLE-9
Changes since 1.1: +2 -2 lines
Diff to previous 1.1
- Patch #471070 by stella: millions of code style fixes.

Revision 1.1 - (view) (download) (as text) (annotate) - [select for diffs]
Wed May 6 10:37:28 2009 UTC (6 months, 3 weeks ago) by dries
Branch: MAIN
- Patch #391340 by chx, dww, neclimdul, Crell, alex_b, et al: job queue API.

The queue system allows placing items in a queue and processing them later.  The system tries to ensure that only one consumer can process an item.

Before a queue can be used it needs to be created by DrupalQueueInterface::createQueue().

Items can be added to the queue by passing an arbitrary data object to DrupalQueueInterface::createItem().

To process an item, call DrupalQueueInterface::claimItem() and specify how long you want to have a lease for working on that item. When finished processing, the item needs to be deleted by calling DrupalQueueInterface::deleteItem(). If the consumer dies, the item will be made available again by the DrapalQueueInterface implementation once the lease expires. Another consumer will then be able to receive it when calling DrupalQueueInterface::claimItem().

The $item object used by the DrupalQueueInterface can contain arbitrary metadata depending on the implementation. Systems using the interface should only rely on the data property which will contain the information passed to DrupalQueueInterface::createItem(). The full queue item returned by DrupalQueueInterface::createItem() needs to be passed to DrupalQueueInterface::deleteItem() once processing is completed.

While the queue system makes a best effort to preserve order in messages, due to the pluggable nature of the queue, there is no guarantee that items will be delivered on claim in the order they were sent. For example, some implementations like beanstalkd or others with distributed back-ends like Amazon SQS will be managing jobs for a large set of producers and consumers where a strict FIFO ordering will likely not be preserved.

The system also makes no guarantees about a task only being executed once: callers that have non-idempotent tasks either need to live with the possiblity of the task being invoked multiple times in cases where a claim lease expires, or need to implement their own transactions to make their tasks idempotent.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

  ViewVC Help
Powered by ViewVC 1.1.2