[commits] Horde branch develop updated. 57ca97ba04bd6a1cce98072a68065db2afe43a5c

Chuck Hagenbuch chuck at horde.org
Mon Nov 14 05:45:40 UTC 2011


The branch "develop" has been updated.
The following is a summary of the commits.

from: 2116578f70368f807ac893a59af546d87c375079

57ca97b It's now possible to queue and execute deferred tasks using Horde_Queue.

-----------------------------------------------------------------------

commit 57ca97ba04bd6a1cce98072a68065db2afe43a5c
Author: Chuck Hagenbuch <chuck at horde.org>
Date:   Mon Nov 14 00:39:35 2011 -0500

    It's now possible to queue and execute deferred tasks using Horde_Queue.
    
    Right now, we hardcode the default array-based storage and shutdown function
    runner as the implementations of Horde_Queue_Storage and
    Horde_Queue_Runner. These can be changed with injector settings at any time in
    the future.
    
    Queue tasks implement the Horde_Queue_Task interface. Add them to be executed by:
    
      class TestTask implements Horde_Queue_Task
      {
          public function run()
          {
              echo "executing\n";
          }
      }
      $queue = $injector->getInstance('Horde_Queue_Storage');
      $queue->add(new TestTask());
    
    They'll be executed during request shutdown. In the future cron or real queue
    (RabbitMQ, etc.) based runners and storage will be necessary.

 framework/Core/lib/Horde/Registry.php                      |   17 ++++++++---
 framework/Queue/lib/Horde/Queue/Runner.php                 |   13 +++++++++
 framework/Queue/lib/Horde/Queue/Runner/Base.php            |   10 -------
 framework/Queue/lib/Horde/Queue/Runner/RequestShutdown.php |    5 +--
 framework/Queue/lib/Horde/Queue/Storage.php                |    5 +++
 framework/Queue/lib/Horde/Queue/Storage/Array.php          |    4 +-
 framework/Queue/lib/Horde/Queue/Storage/Base.php           |    4 ---
 framework/Queue/lib/Horde/Queue/Storage/Db.php             |   12 +++++++-
 framework/Queue/lib/Horde/Queue/Storage/Sqs.php            |    4 +-
 framework/Queue/package.xml                                |    8 +++---
 10 files changed, 50 insertions(+), 32 deletions(-)
 create mode 100644 framework/Queue/lib/Horde/Queue/Runner.php
 delete mode 100644 framework/Queue/lib/Horde/Queue/Runner/Base.php
 create mode 100644 framework/Queue/lib/Horde/Queue/Storage.php
 delete mode 100644 framework/Queue/lib/Horde/Queue/Storage/Base.php

http://git.horde.org/horde-git/-/commit/57ca97ba04bd6a1cce98072a68065db2afe43a5c




More information about the commits mailing list