Skip to content

Lock expiration does not work on Single Table Inheritance objects. #203

Description

@jdejong

Imagine a base class called service

class Service < ActiveRecord::Base
  include Redis::Objects
  lock :mylock, :expiration => 15.minutes, :timeout => 10.seconds 
end

And two subclasses Service 1

class Service1 < Service

end

and Service 2

class Service2 < Service

end

Now you can call

Service.first.mylock_lock.lock.do
   sleep 60
end

and when you check the redis lock object you will see a 1 instead of a timestamp. Any idea why this is not working as expected?

Thanks!

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions