File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
src/dstack/_internal/server/services Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ class RunMetrics:
55 """Wrapper class for run-related Prometheus metrics."""
66
77 def __init__ (self ):
8+ # submit_to_provision_duration reflects real provisioning time
9+ # but does not reflect how quickly provisioning processing works
10+ # since it includes scheduling time, retrying, etc.
811 self ._submit_to_provision_duration = Histogram (
912 "dstack_submit_to_provision_duration_seconds" ,
1013 "Time from when a run has been submitted and first job provisioning" ,
Original file line number Diff line number Diff line change @@ -517,6 +517,8 @@ async def submit_run(
517517 if run_spec .merged_profile .schedule is not None :
518518 initial_status = RunStatus .PENDING
519519 initial_replicas = 0
520+ elif run_spec .configuration .type == "service" :
521+ initial_replicas = run_spec .configuration .replicas .min
520522
521523 run_model = RunModel (
522524 id = uuid .uuid4 (),
@@ -537,7 +539,6 @@ async def submit_run(
537539 session .add (run_model )
538540
539541 if run_spec .configuration .type == "service" :
540- initial_replicas = run_spec .configuration .replicas .min
541542 await services .register_service (session , run_model , run_spec )
542543
543544 for replica_num in range (initial_replicas ):
You can’t perform that action at this time.
0 commit comments