[wp-trac] [WordPress Trac] #25047: Improve heartbeat queue checking
WordPress Trac
noreply at wordpress.org
Tue Aug 20 21:35:53 UTC 2013
#25047: Improve heartbeat queue checking
--------------------------+-----------------------
Reporter: evansolomon | Owner: azaozz
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 3.7
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+-----------------------
Comment (by evansolomon):
I'll propose another idea.
* `isQueued()` should only return a boolean, never the queued value,
`null`, etc. This can just be `this.isQueued = queue.hasOwnProperty`
* There should be a separate method (`getQueuedItem()` or something) to
fetch a queued value, which would return the value if `isQueued()` is
true. I'm not sure what it should return when `isQueued()` is false
(`false`, `null`, `undefined`, `"LOL JavaScript"`...pick your favorite).
This lets `enqueue()` check the queue in the same way everyone else can
and eliminates any confusion about false-y values.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25047#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list