Skip to content

Add retry for cardfinder timeouts #258

@jwoolley

Description

@jwoolley

After moving cardfinder to heroku, there's a failure rate on cardfinder calls—newsbot headline generation seems to fail roughly every other day due to a socket hangup error.

This doesn't seem to be a persistent issue—I don't think I've seen it fail twice in a row, for instance—so it's possible that adding a simple retry on cardfinder calls would mitigate the problem.

Example failure log:

[cardSearchCustomQuery.s (post space-replace)]: t!=basic
[cardSearchCustomQuery.terms]: t!=basic
parsed query argument: not t:basic
Searching for 1 cards.
REQUEST DATA 
undefined
Error: Failed to fetch card data: Error: socket hang up
    at cardFinderSearch (/var/git/mtgnewsbot/src/lib/plugins/tracery/modifiers/cardfinder-modifiers.js:363:13)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions