mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-01 16:57:57 +00:00
Merge pull request #881 from balena-io/fix-service-manager
Add missing ServiceManager methods
This commit is contained in:
commit
f738416242
@ -226,6 +226,15 @@ export class ServiceManager extends (EventEmitter as {
|
||||
}
|
||||
}
|
||||
}
|
||||
public getAllByAppId(appId: number) {
|
||||
return this.getAll(`app-id=${appId}`);
|
||||
}
|
||||
|
||||
public async stopAllByAppId(appId: number) {
|
||||
for (const app of await this.getAllByAppId(appId)) {
|
||||
await this.kill(app, { removeContainer: false });
|
||||
}
|
||||
}
|
||||
|
||||
public async create(service: Service) {
|
||||
const mockContainerId = this.config.newUniqueKey();
|
||||
|
Loading…
x
Reference in New Issue
Block a user