The discussion revolves around issues with running the Rails server in daemon mode (--daemon) in a Discourse development environment, particularly when using the discourse-solved plugin. pieceOpiland reports that the plugin stops functioning correctly when the server runs as a daemon, such as the ‘accept as solution’ option disappearing. Falco confirms the issue and suggests using a terminal multiplexer like tmux or byobu as a workaround, which pieceOpiland successfully implemented. Bill_Wang also encountered a similar problem, experiencing an uninitialized constant Jobs::BotInput error when posting a new topic in daemon mode. sam attributes this to the Rails reloader, which is not plugin-friendly and can cause job classes like BotInput to be lost upon reload. The consensus is that the best solution is to stop and relaunch the server, though a potential fix involving a hack to handle bot jobs is suggested.
I’ve followed the instructions at Install Discourse on macOS for development to install a development environment of discourse. I’ve also installed the discourse-solved plugin, and everything works when I run: bundle exec rails server.
I wanted to run discourse with rails’ built in daemon. However, when I run the command bundle exec rails server --daemon, the discourse-solved plugin no longer seems to function correctly. For example, the option to accept a post as a solution is no longer available.
Does anyone have advice on how to get the plugin working correctly as a daemon in this fashion, or whether or not I should forgo this daemon mode and find a better strategy?
Yeah this is the reloader, it is not super plugin friendly, to say the least
When this happens you sadly have to stop everything and relaunch
@tgxworld we should probably put a hack in place to compensate for bot… what happens is the job base class gets reloaded nuking the bot input job which never gets reloaded.