if sync fails it never runs again #69

Closed
opened 2018-05-10 03:45:09 +02:00 by tiger5226 · 2 comments
tiger5226 commented 2018-05-10 03:45:09 +02:00 (Migrated from github.com)

The sync process should continue to try on schedule, even if it hits an error. In the current state, if it hits an error the only way to launch the sync process again is restart the lighthouse service on the machine.

This issue is triggered by the investigation of #68. The claim trie had not been synced since the last deployment because it failed once when elastic search connection was not instantly available. Making sure it can retry later, is important to avoiding this in the future.

The sync process should continue to try on schedule, even if it hits an error. In the current state, if it hits an error the only way to launch the sync process again is restart the lighthouse service on the machine. This issue is triggered by the investigation of #68. The claim trie had not been synced since the last deployment because it failed once when elastic search connection was not instantly available. Making sure it can retry later, is important to avoiding this in the future.
tiger5226 commented 2018-05-10 03:47:30 +02:00 (Migrated from github.com)

This is solved with PR #70.

If we catch a rejected promise, we should wait the same time interval and try again.

@filipnyquist - Please let me know if you see any issue with this.

my tests show the following:

caught
run again..
rejected
caught
run again..
rejected
caught
run again..
rejected
caught
run again..
rejected
caught

I tested by calling reject at the top of sync, decreased the loop to 3 seconds. Then output to the console to make sure it was looping as expected instead of stopping altogether.

This is solved with PR #70. If we catch a rejected promise, we should wait the same time interval and try again. @filipnyquist - Please let me know if you see any issue with this. my tests show the following: ``` caught run again.. rejected caught run again.. rejected caught run again.. rejected caught run again.. rejected caught ``` I tested by calling `reject` at the top of sync, decreased the loop to 3 seconds. Then output to the console to make sure it was looping as expected instead of stopping altogether.
filipnyquist commented 2018-05-10 16:03:06 +02:00 (Migrated from github.com)

Pull now merged!

Pull now merged!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lighthouse.js#69
No description provided.