Skip to content

Issues with sidekiq not seeing all the associations. #15

@urkle

Description

@urkle

So I have a rails application and am making use of this gem to automatically build up my associations (which is OH so awesome BTW).. However I added a new sidekiq job which is fails the first time it is run due to the associations not being created yet.

Scenario

  • a rails production environment
  • a Client model
  • an AccessToken model which has a foreign key to client (via a client_id column)
  • a sidekiq job that takes a client_id and user_id (user id is irrelevant for the purposes of this bug)
    • this job loads up the client Client.find(client_id) and attempts to use the access_tokens association

What happens

  • an error is raised as there is no access_tokens association (yet).

So.. any ideas on how I can get this gem to generate all of the associations on sidekiq startup so I don't run into this issue?

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