But some of those processes are required only if running the web server along, not when we do iex -S mix to get a console. Can I filter out those processes if the main server process is not started?
Perhaps a bit of a tangent, but this is one of the reasons I Always use Releases. Running a remote console gets you a console running inside the existing running node, so you don’t have to worry about it starting up extra stuff.
It’s your worker, just add a config to control whether to work or not, in dev.exs make the value false and have your worker check for true/false then don’t do any work if false.