[Buildbot-commits] [Buildbot] #2443: Generic way to collapse multiple calls to a function, with support for stopping

Buildbot trac trac at buildbot.net
Wed Apr 23 00:47:01 UTC 2014


#2443: Generic way to collapse multiple calls to a function, with support for
stopping
------------------------+---------------------
Reporter:  dustin       |       Owner:  dustin
    Type:  enhancement  |      Status:  new
Priority:  major        |   Milestone:  0.8.+
 Version:  0.8.7p1      |  Resolution:
Keywords:  sprint       |
------------------------+---------------------

Old description:

> In a few places, we want to perform some kind of check at least once
> after every call to a particular function.  A good example is
> maybeStartBuilds -- the master should check for the possibility of
> starting new builds at least once after each call to this function, but
> not necessarily on *every* call to the function.
>
> It's even harder to make sure that any ongoing check is complete before a
> service stops.
>
> This is complex to implement, and should be implemented as a utility and
> heavily tested on its own.

New description:

 In a few places, we want to perform some kind of check at least once after
 every call to a particular function.  A good example is maybeStartBuilds
 -- the master should check for the possibility of starting new builds at
 least once after each call to this function, but not necessarily on
 *every* call to the function.

 It's even harder to make sure that any ongoing check is complete before a
 service stops.

 This is complex to implement, and should be implemented as a utility and
 heavily tested on its own.

--

Comment (by dustin):

 Underscore.js has a few methods like this, including `debounce`.  It might
 be worth patterning this functionality on Underscore.js -- or better, on
 AngularJS, if it has similar functionality.

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2443#comment:3>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list