Search in sources :

Example 1 with BackupProcess

use of jetbrains.buildServer.serverSide.maintenance.BackupProcess in project teamcity-rest by JetBrains.

the class ServerRequest method getBackupStatus.

/**
 * @return current backup status
 */
@GET
@Path("/backup")
@Produces({ "text/plain" })
@ApiOperation(value = "Get the latest backup status.", nickname = "getBackupStatus")
public String getBackupStatus() {
    BackupProcessManager backupManager = myServiceLocator.getSingletonService(BackupProcessManager.class);
    final BackupProcess backupProcess = backupManager.getCurrentBackupProcess();
    if (backupProcess == null) {
        return "Idle";
    }
    return backupProcess.getProgressStatus().name();
}
Also used : BackupProcess(jetbrains.buildServer.serverSide.maintenance.BackupProcess) BackupProcessManager(jetbrains.buildServer.serverSide.maintenance.BackupProcessManager) ApiOperation(io.swagger.annotations.ApiOperation)

Aggregations

ApiOperation (io.swagger.annotations.ApiOperation)1 BackupProcess (jetbrains.buildServer.serverSide.maintenance.BackupProcess)1 BackupProcessManager (jetbrains.buildServer.serverSide.maintenance.BackupProcessManager)1