[wp-meta] [Making WordPress.org] #703: Keep track of which WordCamps each profile has spoken at and organized

Making WordPress.org noreply at wordpress.org
Thu Apr 9 23:33:31 UTC 2015

#703: Keep track of which WordCamps each profile has spoken at and organized
  Reporter:  iandunn  |      Owner:
      Type:  defect   |     Status:  new
  Priority:  normal   |  Component:  Profiles
Resolution:           |   Keywords:

Comment (by iandunn):

 Actually, now I'm thinking that Scott was right in comment:6, it makes
 more sense to handle this on the notifer side than the handler side. The
 notifier has direct access to all the relevant data required to make the
 decision on whether the association should be removed or not. If the
 notifier tells the handler to remove an association, it doesn't make sense
 for the handler to try and figure out if what the notifier asked it to do
 is correct or not.

 Checking if a given username has spoken at/organized other camps is an
 expensive query, but we don't need to run it each time a speaker|organizer
 is added|removed, we can just build an index once a day that contains the
 number of camps each user has spoken at/organized:

     [23430] => Array(
         ['spoken'] => 5,
         ['organized] => 3,
     [3523423] => Array(
         ['spoken'] => 0,
         ['organized] => 2,
     [n] => [...]

 When they're added|removed from the speaker|organizer post, we can update
 the index and then check it to see if the speaker|organizer still has a
 positive value, and send the removal command based on that.

 I'd have to run some tests to see how large that array would be; maybe
 it'd eventually get too big to store in `wp_options`, but if that's the
 case we could probably stick it somewhere else.

Ticket URL: <https://meta.trac.wordpress.org/ticket/703#comment:12>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org

More information about the wp-meta mailing list