Hi friends, how do I use `execute_in_process` meth...
# ask-community
q
Hi friends, how do I use
execute_in_process
method on a job created using
define_asset_job
?
o
hi @Qwame -- the easiest way to do this is actually to pull the job off of the repository, as
define_asset_job
jobs aren't fully resolved until they're placed there. So one option would look like
Copy code
from my_package import my_repository

def test_my_job():
    result = my_repository.get_job("name_of_job").execute_in_process()
q
Thanks @owen. What if I am using definitions?
Got it, thanks!
🌈 1
s
Hi , I have used this command and is working but ... dagit is not showing the progress or status on the UI... but I know is running. Could you explain me why this happen? and if there is a way make dagit aware of this process?
o
the DagsterInstance is where all events get stored, and these events are what allow Dagit to know what's happening in your pipelines / jobs
if you have a
dagster.yaml
file set up, then you can pass in
instance=DagsterInstance.get()
to the execute_in_process call, which should cause this execution to write to your real dagster instance (rather than the default temporary one)
s
I have setup the $DAGSTER_HOME. I am getting this error. I have en empty dagster.yml I see that all folder are created according to the documention: "If
DAGSTER_HOME
is set but
dagster.yaml
isn't present or is empty, Dagster will persist data on the local filesystem, structured like the following:" But when I run the job I am getting Dagster home is not set
Should I have a specific config on dasgter.yaml?
I solve it passing the instance from the context of the operation: context.instance
286 Views