Commit Graph

41 Commits (8550540b511967961c095fc085c8cc8062c424f3)

Author SHA1 Message Date
Dries Buytaert 4ef77a590c - 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.
2009-05-06 10:37:28 +00:00
Angie Byron f40532da76 #376129 by boombatower, Damien Tournoud, and chx: Change getInfo() to a static method to reduce memory footprint of SimpleTest. 2009-03-31 01:49:55 +00:00
Angie Byron 6afc39c2e4 #135976 by Dave Reid: Move Administration Theme setting to the themes page where it is findable (with tests). 2009-02-11 05:33:18 +00:00
Angie Byron 250e486bb0 #363687 by chx: Simplify DBTNG codeflow. 2009-01-25 12:19:32 +00:00
Dries Buytaert 60c06921ce - Patch #291026 by Dave Reid et al: further (usability) improvements to the E_NOTICE handling. 2009-01-21 14:22:33 +00:00
Dries Buytaert a10731cedf - Patch #320451 by chx, Damien Tournoud: improved Drupal's module dependency system. This helps with fields in core. Comes with tests\! 2009-01-14 12:18:37 +00:00
Dries Buytaert bdbd0dffe5 - Patch #266246 by David Strauss: added smart defaults for system_settings_form(). 2009-01-11 21:19:19 +00:00
Dries Buytaert 86aa636c8b - Patch #353207 by CitizenKane and drewish: cleaned up the FILE_STATUS_TEMPORARY field. 2009-01-02 21:45:11 +00:00
Dries Buytaert 92a8adea65 - Patch #352470 by scor: fixed typos and grammar in comments. 2008-12-30 16:43:20 +00:00
Dries Buytaert 53b83cdcb9 - Patch #330633 by drewish: temporary file clean-up _and_ unit tests. Oh yeah. 2008-12-28 19:11:31 +00:00
Dries Buytaert 574a2e47ee - Patch #345866 by alexanderpas, justinrandell, Dave Reid: remove from hook_block(). 2008-12-16 23:57:33 +00:00
Dries Buytaert c50651f7fb - Patch #340557 by Dave Reid: use static caching in drupal_is_front_page(). 2008-12-09 07:16:10 +00:00
Dries Buytaert 55382d04a7 - Patch #318016 by Dave Reid: step one to standardizing type-hinting. 2008-12-08 21:41:54 +00:00
Dries Buytaert 58b0235a72 - Patch #324313 by catch et al: load multiple nodes and terms at once. 2008-12-05 22:18:46 +00:00
Dries Buytaert 74f2efd561 - Patch #314870 by drewish: removed some code that accidentically got committed with api.php and that broke the tests. 2008-11-26 18:56:16 +00:00
Angie Byron 66df602593 #314870 by Rob Loach, drewish, catch, and sun: Add hook API documentation to Drupal core. 2008-11-25 02:37:33 +00:00
Dries Buytaert 5083e13522 - Patch #333143 by justinrandell: cleaning up the Drupal bootstrap code, removing bootstrap flag in system table. 2008-11-24 10:41:40 +00:00
Angie Byron 53f53b6db5 #11077 by mfb, KarenS, macgirvin, and jjkd: Can you say Daylight Savings Time? I bet you didn't think Drupal ever would! :) 2008-11-20 06:56:17 +00:00
Dries Buytaert fa94c66c92 - Patch #328719 by c960657: make the module list tests succeed again. 2008-11-01 21:21:35 +00:00
Dries Buytaert 35c7673cae - Patch #327480 by chx: remove DB specific code from simpletest. 2008-10-31 11:13:31 +00:00
Dries Buytaert f7e61d77e9 - Patch #296321 by pwolanin, swentel: link to cron.php broken when clean URLs are disabled. 2008-10-13 20:29:42 +00:00
Angie Byron 8292bdd40a Re-commit of #242873 by pwolanin and bjaspan: Make drupal_set_title() check_plain() by default. 2008-10-13 00:33:05 +00:00
Angie Byron a3a420c3e6 Roll-back of #242873: This caused horrendous problems with SimpleTest on some configurations. 2008-10-12 06:27:06 +00:00
Angie Byron 4d20274076 #253569 by aaron, agentrickard, and Dave Reid: Add hook_modules_X to allow modules to react when other modules are enabled, disabled, installed, or uninstalled. 2008-10-11 22:46:22 +00:00
Angie Byron ecf7ad41d0 #242873 by pwolanin and bjaspan: Make drupal_set_title() do check_plain() by default. 2008-10-11 21:11:02 +00:00
Angie Byron 047b4bde38 #296306 by swentel: Test for custom 403 page. 2008-10-11 18:17:02 +00:00
Angie Byron da7f3a0ef0 #319699 follow-up by Dave Reid: Simplify required module hiding in admin/build/modules. 2008-10-11 15:54:14 +00:00
Angie Byron 819b0e95a9 #319699 by Dave Reid: Simplify logic for hiding required modules. 2008-10-11 03:25:36 +00:00
Angie Byron 7e02f2f782 #318984 by Xano and Dave Reid: Change 'Core - optional' to 'Core' in modules UI. 2008-10-11 02:33:14 +00:00
Angie Byron 161a9970f7 #308534 by Dave Reid: Remove stray whitespace core-wide. 2008-09-15 20:48:10 +00:00
Dries Buytaert 762ca25ecf - Patch #296305 by Damien Tournoud, recidive, cwgordon7, chx: 404 page needs a test -- testing party 2008-08-28 08:37:46 +00:00
Dries Buytaert c15bcc0653 - Patch #297869 by boombatower: add xpath method to simpletest and refactor existing tests. 2008-08-22 12:35:55 +00:00
Dries Buytaert d743fcc5c7 - Patch #229129 by dmitrig01: clean up system modules page. 2008-07-23 07:37:06 +00:00
Dries Buytaert 1d97b23ae4 - Patch #256886 by catch et al: comment out a test that fails due to a bug in cURL. 2008-06-29 11:39:38 +00:00
Dries Buytaert 76fe77cc22 - Patch #275092 by kbahey: added test for meta-tag generator patch. 2008-06-28 19:19:08 +00:00
Dries Buytaert 201e1dd356 - Patch #268449 by catch: fixed some tests that failed due to invalid permissions. 2008-06-09 16:33:20 +00:00
Dries Buytaert 098b3f72ca - Patch #250918 by boombatower: cleaned up some tests and added some tests for the administration panels. 2008-06-02 17:32:19 +00:00
Dries Buytaert bc5f69a333 - Patch #261836 by dropcube: tests for cron. 2008-05-30 07:27:14 +00:00
Dries Buytaert 5316c645d2 - Patch #259871 by pwolanin: clean up system.test. 2008-05-19 19:28:39 +00:00
Dries Buytaert 0a31af3ed2 - Patch #256152 by catch: added additional tests for the IP address blocking and added a small usability improvement. 2008-05-10 07:32:02 +00:00
Dries Buytaert af474609e3 - Added a test framework to Drupal along with a first batch of tests for
Drupal core!  This is an important milestone for the project so enable
  the module and check it out ... :)

  Thanks to Rok Žlender, Károly Négyesi, Jimmy Berry, Kevin Bridges, Charlie
  Gordon, Douglas Hubler, Miglius Alaburda, Andy Kirkham, Dimitri13, Kieran
  Lal, Moshe Weitzman, and the many other people that helped with testing
  over the past years and that drove this home.

  It all works but it is still rough around the edges (i.e. documentation
  is still being written, the coding style is not 100% yet, a number of
  tests still fail) but we spent the entire weekend working on it in Paris
  and made a ton of progress.  The best way to help and to get up to speed,
  is to start writing and contributing some tests ... as well as fixing
  some of the failures.

  For those willing to help with improving the test framework, here are
  some next steps and issues to resolve:

    - How to best approach unit tests and mock functions?
    - How to test drupal_mail() and drupal_http_request()?
    - How to improve the admin UI so we have a nice progress bar?
    - How best to do code coverage?
    - See http://g.d.o/node/10099 for more ...
2008-04-20 18:24:07 +00:00