mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-04-24 04:55:42 +00:00
fix: Properly bind context to healthchecks
Change-type: patch Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
parent
707ddb5f45
commit
6a9ca2a60d
@ -37,7 +37,18 @@ module.exports = class Supervisor extends EventEmitter
|
||||
# FIXME: rearchitect proxyvisor to avoid this circular dependency
|
||||
# by storing current state and having the APIBinder query and report it / provision devices
|
||||
@deviceState.applications.proxyvisor.bindToAPI(@apiBinder)
|
||||
@api = new SupervisorAPI({ @config, @eventTracker, routers: [ @apiBinder.router, @deviceState.router ], healthchecks: [ @apiBinder.healthcheck, @deviceState.healthcheck ] })
|
||||
@api = new SupervisorAPI({
|
||||
@config,
|
||||
@eventTracker,
|
||||
routers: [
|
||||
@apiBinder.router,
|
||||
@deviceState.router
|
||||
],
|
||||
healthchecks: [
|
||||
@apiBinder.healthcheck.bind(@apiBinder),
|
||||
@deviceState.healthcheck.bind(@deviceState)
|
||||
]
|
||||
})
|
||||
|
||||
init: =>
|
||||
@db.init()
|
||||
|
Loading…
x
Reference in New Issue
Block a user