Redix.pipeline-exclamation-mark

You're seeing just the function pipeline-exclamation-mark, go back to Redix module for more information.
Link to this function

pipeline!(conn, commands, opts \\ [])

View Source

Specs

pipeline!(connection(), [command()], keyword()) :: [
  Redix.Protocol.redis_value()
]

Issues a pipeline of commands to the Redis server, raising if there's an error.

This function works similarly to pipeline/3, except:

  • if there are no errors in issuing the commands (even if there are one or more Redis errors in the results), the results are returned directly (not wrapped in a {:ok, results} tuple).
  • if there's a connection error then a Redix.ConnectionError exception is raised.

For more information on why nothing is raised if there are one or more Redis errors (Redix.Error structs) in the list of results, look at the documentation for pipeline/3.

This function accepts the same options as pipeline/3.

Examples

iex> Redix.pipeline!(conn, [["INCR", "mykey"], ["INCR", "mykey"], ["DECR", "mykey"]])
[1, 2, 1]

iex> Redix.pipeline!(conn, [["SET", "k", "foo"], ["INCR", "k"], ["GET", "k"]])
["OK", %Redix.Error{message: "ERR value is not an integer or out of range"}, "foo"]

If Redis goes down (before a reconnection happens):

iex> Redix.pipeline!(conn, [["SET", "mykey", "foo"], ["GET", "mykey"]])
** (Redix.ConnectionError) :closed