[buddypress-trac] [BuddyPress Trac] #5328: Use of the WordPress HeartBeat API to check for newest activities and to let user load them

buddypress-trac noreply at wordpress.org
Wed Feb 19 02:26:45 UTC 2014


#5328: Use of the WordPress HeartBeat API to check for newest activities and to
let user load them
-------------------------------------------------+-----------------------
 Reporter:  imath                                |       Owner:  imath
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  2.0
Component:  Activity                             |     Version:  1.9.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch 2nd-opinion needs-testing  |
-------------------------------------------------+-----------------------

Comment (by imath):

 In 5328.03.diff :
 a) Last comment by boonebgorges on #5409 made me think of a different way
 to load the newest activities. I do not need to modify the {{{
 BP_Activity_Activity::get_last_updated()}}} method anymore as i'm using an
 activity loop to directly build the list of activities, then display it
 from buddypress.js. I thought that it would avoid the query to check for
 the latest id, doing this way.
 b) About {{{heartbeat_settings}}}, i'm suggesting an alternative way to
 set the heartbeat pulse : from {{{buddypress.js}}}.
 c) the {{{heartbeat-send}}} is namespaced to {{{heartbeat-
 send.buddypress}}}
 d) i've prefixed all keys in JS
 e) about Heatbeat pulse, i've set it to 15s, but we could set it to 5s
 ("fast") because as DJPaul said "people weren't on pages for longer than
 15 seconds". Moreover in heartbeat.js, there's an interesting comment :

 {{{
 * When setting to 'fast' or 5, by default interval is 5 sec. for the next
 30 ticks (for 2 min and 30 sec).
 * In this case the number of 'ticks' can be passed as second argument.
 * If the window doesn't have focus, the interval slows down to 2 min.
 }}}

 f) Activity HeartBeat option is now on by default

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5328#comment:14>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list