How to query Redis from an Exq worker?

I am in the process of migrating from Ruby/Sidekiq workers over to Elixir with Exq.

I can push jobs into Redis through Sidekiq, and my Elixir workers receive them, but I’m having trouble figuring out how to query Redis directly from the Exq worker. In Ruby, I would’ve done something like:

Sidekiq.redis go |red|
red.get(some_key)
.
.
.
end

Is there some similar facility in Exq? I was looking through the docs at Exq.Redis.Connection, but I’m not having much luck getting this to work. Anyone have any suggestions?

Thanks

1 Like

In case anyone else runs into the same situation that I was - here’s the solution:

Exq.Redis.Connection.qp!(:sys.get_state(Exq).redis, [["keys", "*"]])
1 Like