Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bin/backup_contacts.php dying #18

Open
lhl opened this issue Jan 31, 2012 · 8 comments
Open

bin/backup_contacts.php dying #18

lhl opened this issue Jan 31, 2012 · 8 comments

Comments

@lhl
Copy link
Contributor

lhl commented Jan 31, 2012

So this happens:

lhl@snowball2 flickr $ php /www/flickr/bin/backup_contacts.php 
<pre style="text-align: left;">array (
  'ok' =&gt; 0,
  'error' =&gt; 'The Flickr API did not return any contacts',
)</pre>

Will debug and see if I can pinpoint at least where it's dying...

@straup
Copy link
Owner

straup commented Feb 1, 2012

Note to self: At a minimum this code should check that the Flickr API hasn't failed before purging contacts.

@straup
Copy link
Owner

straup commented Feb 1, 2012

This is sort of half-fixed, now. Specifically I've added retry code:

f581c75

I'll leave this ticket open until I tweak the code to buffer all new contacts (read: retries) before purging anything that's already in the database.

@straup
Copy link
Owner

straup commented Feb 2, 2012

Fixed: c9824f5

@straup straup closed this as completed Feb 2, 2012
@lhl
Copy link
Contributor Author

lhl commented Feb 2, 2012

Been dealing w/ work issues so haven't gotten a chance to take much of a look. Did a merge, here are the results:

backup contacts for lhl
page: 1/ tries: 1/10 ok: 1
page: 1/4 tries: 1/10 ok: 0
page: 1/4 tries: 2/10 ok: 0
page: 1/4 tries: 3/10 ok: 0
page: 1/4 tries: 4/10 ok: 0
page: 1/4 tries: 5/10 ok: 0
page: 1/4 tries: 6/10 ok: 0
page: 1/4 tries: 7/10 ok: 0
page: 1/4 tries: 8/10 ok: 0
page: 1/4 tries: 9/10 ok: 0
page: 1/4 tries: 10/10 ok: 0

array (
  'ok' => 0,
  'error' => 'Unable to fetch contacts: The Flickr API did not return any contacts',
)

@straup
Copy link
Owner

straup commented Feb 2, 2012

Grrrrnnnn.

The good news is that it appears as though the retry code is working. This makes it seems like there's still a bug though:

page: 1/ tries: 1/10 ok: 1
page: 1/4 tries: 1/10 ok: 0

That second line should say "page: 2/4"

The bad news is that the Flickr API continues to wig out. It's almost as though contacts are being stored in Vespa or something...

@straup straup reopened this Feb 2, 2012
@mncaudill
Copy link
Contributor

I'm 95% sure that getContacts is hitting the DBs. There was some flip-flop for a while there due to some shit I don't remember, but I think it should be hitting the DBs.

@straup
Copy link
Owner

straup commented Feb 2, 2012

Also, just to be clear: This is no longer purging all the contacts for a user before re-fetching them via the API.

If there is a "fatal" error re-fetching contacts it just means that the local database is not updated. All previous contacts are left untouched.

@mojodna
Copy link

mojodna commented Feb 5, 2012

I'm seeing this intermittently as well (as of c9824f5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants