Skip to content

Activity and Workflow lookup does not work with autoload #279

Open
@mariawithpersona

Description

@mariawithpersona

I'm trying to implement Rails' autoloading feature in my local development so I can avoid restarting the workers every time I make a code change. This was easily achieved with a middleware

class ReloaderMiddleware
  def call(_, &block)
    ::Rails.application.reloader.wrap(&block)
  end
end

However, any Temporal::Workflow and Temporal::Activity class definition are cached in memory at registration time by ExecutableLookup, so changes in those particular classes are not reflected when the code reloads. It would be really nice to offer an option to reload those classes at run time, and make it optionally available only during development.

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