Hello all. Is it possible to add new jobs to a re...
# ask-community
Hello all. Is it possible to add new jobs to a repository without having to restart the container? I want to make a client that can dynamically assemble a job visually, then submit it. I can't seem to figure out if this is even possible.
hey @Todd i have a couple clarification questions: Are you attempting to make a UI where you can author a new job from scratch? or are you trying to provide a way for a user to customize existing jobs by supplying custom values for different variables?
The former. I have ops, assets, and graphs. I can connect all the dots to form an analysis (as in it works, but I'm creating the contrived example as a @job). I also have a client that allows a user to drag and drop boxes and connect them with lines. So users would assemble a job/graph, submit it for processing.
Hey Todd - you can do this by returning a "RepositoryData" subclass from your repository object - case 3 here: https://docs.dagster.io/_apidocs/repositories#dagster.repository - the "get_all_jobs" method on that class will be called every time you reload the code lcoation in Dagit
So its a bit off the beaten path but it's possible. You do need to restart the container whenever your code changes though
Here's an example of constructing a graph/job from some other data source: https://docs.dagster.io/concepts/ops-jobs-graphs/graphs#constructing-dependencies - you would need to store the underlying data yourself but dagster can construct jobs and graphs from yaml files or other data sources if you write code like in that example