[dev] [commits] Horde branch imp_6_1 updated. d6b64567a2a42f722b042bd63024919f8f7c95ec

Jan Schneider jan at horde.org
Mon Feb 25 18:53:04 UTC 2013


Zitat von Michael M Slusarz <slusarz at horde.org>:

> Quoting Jan Schneider <jan at horde.org>:
>
>> Zitat von Michael M Slusarz <slusarz at horde.org>:
>>
>>> The branch "imp_6_1" has been updated.
>>> The following is a summary of the commits.
>>>
>>> from: a06ffb5643c6618d650c3035e0c2096a842595da
>>>
>>> d6b6456 Convert shutdown methods to Horde_Queue tasks
>>>
>>> -----------------------------------------------------------------------
>>>
>>> commit d6b64567a2a42f722b042bd63024919f8f7c95ec
>>> Author: Michael M Slusarz <slusarz at horde.org>
>>> Date:   Sun Feb 24 00:51:40 2013 -0700
>>>
>>>   Convert shutdown methods to Horde_Queue tasks
>>>
>>> imp/lib/Factory/Compose.php     |    6 +++---
>>> imp/lib/Factory/Flags.php       |   26 ++++++++++++++------------
>>> imp/lib/Factory/Imap.php        |   29 +++++++++++++++++------------
>>> imp/lib/Factory/Imaptree.php    |   36 ++++++++++++++++++------------------
>>> imp/lib/Factory/Mailbox.php     |   16 ++++++++++------
>>> imp/lib/Factory/MailboxList.php |    8 ++++----
>>> imp/lib/Factory/Search.php      |   26 ++++++++++++++------------
>>> imp/package.xml                 |    7 +++++++
>>> 8 files changed, 87 insertions(+), 67 deletions(-)
>>>
>>> http://git.horde.org/horde-git/-/commit/d6b64567a2a42f722b042bd63024919f8f7c95ec
>>
>> This won't work. Queue tasks need to be able to run individually,  
>> without environment. At the moment all tasks are run by the  
>> shutdown runner, but this doesn't have to be the case in the  
>> future. At least in one of the tasks, I see you accessing the  
>> current session, that isn't guaranteed to exist. At the minimum you  
>> need to inject the required information into the task objects.
>
> This is entirely unobvious from the documentation.  Probably because  
> there is none.
>
> It would be nice if there was a global shutdown tasks runner with  
> the full Horde environment.  Is this something that could be easily  
> added on top of Horde_Queue?

Try what I committed. For now the queue and the new ShutdownRunner  
factories return the same object, but we still have the option to use  
a different queue storage or runner in the future without breaking  
things.
If possible you should still check if you could turn the tasks into  
independent Horde_Queue tasks though.
-- 
Jan Schneider
The Horde Project
http://www.horde.org/



More information about the dev mailing list