Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activity and Workflow lookup does not work with autoload #279

Open
mariawithpersona opened this issue Jan 11, 2024 · 1 comment
Open

Activity and Workflow lookup does not work with autoload #279

mariawithpersona opened this issue Jan 11, 2024 · 1 comment

Comments

@mariawithpersona
Copy link

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.

@DeRauk
Copy link
Contributor

DeRauk commented Jan 18, 2024

Could you tear down and rebuild your worker in your middleware?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants