Skip to content

Commit 14e5480

Browse files
committed
make scheduler warning stack easier to parse
Summary: Now upon dagit start: ``` /Users/prha/code/dagster/python_modules/dagit/dagit/app.py:197: UserWarning: You have defined ScheduleDefinitions for this repository, but have not defined a scheduler on the instance warnings.warn(MISSING_SCHEDULER_WARNING) ``` Test Plan: started dagit Reviewers: sashank, max Reviewed By: sashank Differential Revision: https://dagster.phacility.com/D2033
1 parent 0c7274e commit 14e5480

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

  • python_modules/dagit/dagit

python_modules/dagit/dagit/app.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
from .templates.playground import TEMPLATE as PLAYGROUND_TEMPLATE
3535
from .version import __version__
3636

37+
MISSING_SCHEDULER_WARNING = (
38+
'You have defined ScheduleDefinitions for this repository, but have '
39+
'not defined a scheduler on the instance'
40+
)
41+
3742

3843
class DagsterGraphQLView(GraphQLView):
3944
def __init__(self, context, **kwargs):
@@ -189,10 +194,7 @@ def create_app(handle, instance, reloader=None):
189194
python_path, repository_path, repository=repository, instance=instance
190195
)
191196
else:
192-
warnings.warn(
193-
'You have defined ScheduleDefinitions for this repository, but have '
194-
'not defined a scheduler on the instance'
195-
)
197+
warnings.warn(MISSING_SCHEDULER_WARNING)
196198

197199
app.add_url_rule(
198200
'/graphql',

0 commit comments

Comments
 (0)