Non-runnables are being setup automatically.
In practice, they’re being setup after their last token provider has been started.master
parent
ef7521c5b6
commit
1a90b285d2
|
@ -373,6 +373,31 @@ class Service
|
|||
now = Time.local
|
||||
end
|
||||
end
|
||||
|
||||
provides.each do |token_definition|
|
||||
reverse_dependencies = get_consumers(token_definition.token)
|
||||
.map(&.id)
|
||||
.compact_map do |id|
|
||||
context.get_service_by_id id
|
||||
end
|
||||
|
||||
reverse_dependencies.each do |service|
|
||||
next unless service.non_runnable
|
||||
|
||||
should_start = service
|
||||
.dependency_tree.flatten
|
||||
.select(&.!=(self))
|
||||
.map(&.status(context))
|
||||
.map do |status|
|
||||
status.running? || status.non_runnable?
|
||||
end
|
||||
.reduce do |a, b| a && b end
|
||||
|
||||
if should_start
|
||||
service.start context
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# TODO:
|
||||
|
|
Loading…
Reference in New Issue