Visitar URL original
Retry with exponential backoff · Issue #9 · jfischoff/postgresql-queue · GitHub
Skip to content

Retry with exponential backoff #9

Open

Description

@charles-cooper

Reading the implementation for withPayloadDB,

-- Retry on failure up to retryCount
handle (\e -> when (pAttempts < retryCount)
(void $ retryDB schemaName pValue pAttempts)
, it looks like there is no strategy for backoff. Would it be better to implement some sort of backoff strategy within postgresql-simple-queue or do have a client-side implementation? E.g.

forever $ do
  withPayloadDB "public" 5 $ \payload -> do
    tryProcessPayload
  sleep 10 -- or something more complicated based on `pModifiedAt` and `pAttempts`

Activity

  1. jfischoff commented on May 3, 2018

    @jfischoff
    Owner

    Just saw this. Yeah retry with exponential backoff sounds like a improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions