I'm pretty sure there's a small bug in the mailchimp_cron implementation as of 6.x-2.0.

Users will not be moved from "pending" to "current" with this code.

Comments

xurizaemon’s picture

Status: Active » Needs review
StatusFileSize
new708 bytes

ACTUALLY DODGY. Check next comment's patch.

xurizaemon’s picture

StatusFileSize
new708 bytes

Patch. Probably dodgy because I don't have a handy CVS checkout but you should get the idea :)

xurizaemon’s picture

Patch is against 6.x-2.0 release tarball btw.

xurizaemon’s picture

Thinking that rather than altering this line (so it works before the user_load() happens), we should just transpose the line with the if ( user_load() ) ... that reads a little better to me, even though it should have no practical difference (if user_load() fails, the user should have been deleted from {mailchimp_user} table already).

xurizaemon’s picture

Title: Mailchimp cron doesn't remove users from queue » Mailchimp cron does not move final user from queue.

Btw, symptom for this appears to be that you will have ONE user sitting in 'pending'. The $account->uid variable moved from the queue points to the previously updated user.

What's actually happening is more analogous to this -

while ( $i < 10 ) {
  print "Moved ". $o ." from queue.\n" ;
  $i++ ;
  $o = $i ;
  print "Updated ". $i ." to Mailchimp.\n" ;
}
 
levelos’s picture

Status: Needs review » Fixed

I took the approach you suggested in http://drupal.org/user/76026, and went further by adding a delete query in case the user_load() fails.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.