mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-20 14:13:08 +00:00
types: Remove temporary Service type in favour of actual compose class
Change-type: patch Signed-off-by: Cameron Diver <cameron@resin.io>
This commit is contained in:
parent
892d227cc2
commit
e8a5edf774
2
src/application-manager.d.ts
vendored
2
src/application-manager.d.ts
vendored
@ -7,7 +7,7 @@ import Images = require('./compose/images');
|
||||
import ServiceManager = require('./compose/service-manager');
|
||||
import DB = require('./db');
|
||||
|
||||
import { Service } from './types/service';
|
||||
import { Service } from './compose/service';
|
||||
|
||||
declare interface Options {
|
||||
force?: boolean;
|
||||
|
2
src/compose/service-manager.d.ts
vendored
2
src/compose/service-manager.d.ts
vendored
@ -1,6 +1,6 @@
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
import { Service } from '../types/service';
|
||||
import { Service } from '../compose/service';
|
||||
|
||||
// FIXME: Unfinished definition for this class...
|
||||
declare class ServiceManager extends EventEmitter {
|
||||
|
2
src/device-api/common.d.ts
vendored
2
src/device-api/common.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
import ApplicationManager from '../application-manager';
|
||||
import { Service } from '../types/service';
|
||||
import { Service } from '../compose/service';
|
||||
|
||||
export interface ServiceAction {
|
||||
action: string;
|
||||
|
@ -3,8 +3,8 @@ import { Request, Response, Router } from 'express';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { ApplicationManager } from '../application-manager';
|
||||
import { Service } from '../compose/service';
|
||||
import { appNotFoundMessage, serviceNotFoundMessage } from '../lib/messages';
|
||||
import Service from '../types/service';
|
||||
import { doPurge, doRestart, serviceAction } from './common';
|
||||
|
||||
export function createV2Api(router: Router, applications: ApplicationManager) {
|
||||
@ -32,13 +32,13 @@ export function createV2Api(router: Router, applications: ApplicationManager) {
|
||||
return;
|
||||
}
|
||||
applications.setTargetVolatileForService(
|
||||
service.imageId,
|
||||
service.imageId!,
|
||||
{ running: action !== 'stop' },
|
||||
);
|
||||
return applications.executeStepAction(
|
||||
serviceAction(
|
||||
action,
|
||||
service.serviceId,
|
||||
service.serviceId!,
|
||||
service,
|
||||
service,
|
||||
{ wait: true },
|
||||
|
@ -1,11 +0,0 @@
|
||||
export interface Service {
|
||||
imageId: number;
|
||||
serviceId: number;
|
||||
appId: number;
|
||||
status: string;
|
||||
releaseId: number;
|
||||
createdAt: Date;
|
||||
serviceName: string;
|
||||
}
|
||||
|
||||
export default Service;
|
Loading…
Reference in New Issue
Block a user