Hey I know there was recent commit on this, but I ...
# ask-community
r
Hey I know there was recent commit on this, but I am locked to 0.15.8. If I am running Dagit and Dagster using the cli files, i.e. "from dagster/dagit import and "cli.main())" , how can I also get the "dagster-daemon" process to run simultaneously with when these two tools are run on local for testing sensors?
d
You could write a Python script that runs both "dagit" and "dagster-daemon run" in subprocesses and terminates them when the script is interrupted - that is more or less all that the new "dagster dev" command does
r
Hey Daniel, let me try that. I may have more questions, been testing variations of that all day. Mostly been getting errors about the workspace not being present but just running Dagit by itself does not create that message.
@daniel Which command would go first? "dagster-daemon run" usually just print a message like this and immediately ends. This is what happens when I run dagster-daemon first, if I run it second it does not make it to that line and hangs at the dagit server command.
d
It shouldn’t matter which one goes first - they both need a workspace.yaml in the folder in which they run
r
Usage: dagster-daemon [OPTIONS] COMMAND [ARGS]... CLI tools for working with the dagster daemon process. Options: --version Show the version and exit. --help Show this message and exit. Commands: debug Daemon debugging utils liveness-check Check for recent heartbeats from the daemon. run Run any daemons configured on the DagsterInstance. wipe Wipe all heartbeats from storage. Using SDK connection to: http://localhost:5001 INFO:Started Dagster code server for file examples/repo.py in process 1190984
d
Dagster-daemon run is the command
r
Ok I will try with a workspace, yes I know. Doing something like this.
subprocess.run(['dagster-daemon', 'run'], shell=True, check=True)
@daniel Once again, really appreciate the help. Got it working.
🎉 1
Definitely more complex using Bazel, but if anyone else asks a similar question it is possible.