Skip to content

Using hworker with two different applications #3

Description

@naglalakk

Hello and thank you for this fine library. I'm wondering about how to use hworker in two different places. The code I'm working on needs to be able to send a message to a queue which is then processed by a hworker. The code adding the message to the queue is in a different location then the one processing it. Both are written in Haskell and both would be talking to the same redis Database. I'm wondering how this would be implemented. Could I have identical data structures on both ends and then push a job into a queue and then the hworker pulls that out of the queue?

So both places declare

data SomeType = A | B deriving (Generic, Show)

location A: push SomeType into message queue
location B: pull SomeType out of message queue and work with it

Would this be the correct approach?

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions