Skip to content

mode definitions with schema #3385

Answered by ahoneycutt
ahoneycutt asked this question in Q&A
Discussion options

You must be logged in to vote

I have answered my own question. Specifically, a call to the resource's configured method is appropriate here. See https://docs.dagster.io/overview/configuration/configured#main for more information.

# pipeline mode definition
mode_development = ModeDefinition('dev', resource_defs={
    'service_one': http_resource.configured({
        'host': String('127.0.0.1'),
        'port': Int(8080),
    }),
    'service_two': http_resource.configured({
        'host': String('127.0.0.1'),
        'port': Int(8888),
    }),
})

Edit: Correct usage of String/Int

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by sryza
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants