class PgORM::Error::LockUnavailable

Overview

Raised when an advisory lock cannot be acquired within the timeout.

Example

lock = PgORM::PgAdvisoryLock.new("my_lock")
lock.timeout = 1.second

# If another process holds the lock for > 1 second
lock.lock # Raises LockUnavailable: "Lock (my_lock) unavailable"

Defined in:

pg-orm/errors.cr

Constructors

Instance methods inherited from class PgORM::Error

message : String? message

Constructor methods inherited from class PgORM::Error

new(message : String | Nil = "") new

Constructor Detail

def self.new(key : String) #

[View source]