public override void Start() { try { Workspace = WorkspaceFactory.Get(); Workspace.Updated += Workspace_Updated; Workspace.Reloaded += Workspace_Reloaded; } catch (Exception ex) { Log.Error("Failed to set up the workspace monitor, clients will not receive updates"); Log.Error(ex); } }
public override GetStatusResponse Start() { var objWsItem = WorkspaceFactory.Get().Get(Request.ItemID); if (objWsItem != null && objWsItem.Project != null) { objWsItem.Project.TargetName = Request.ProjectTargetName; return(new GetStatusResponse(Request, new List <Data.WorkspaceItem> { objWsItem.GetWorkspaceItem() })); } return(new GetStatusResponse(Request, new ResponseStatus(ResponseState.Error, "Project not found"))); }
public override GetStatusResponse Start() { var objWsItem = WorkspaceFactory.Get().Get(Request.ItemID); if (objWsItem != null && objWsItem.Project != null) { MeltJobScheduler.GetScheduler().Schedule(objWsItem.Project.Job); return(new GetStatusResponse(Request, new List <Data.WorkspaceItem>() { objWsItem.GetWorkspaceItem() })); } return(new GetStatusResponse(Request, new ResponseStatus(ResponseState.Error, "Project not found"))); }
public override GetStatusResponse Start() { var objWsItem = WorkspaceFactory.Get().Get(Request.ItemID); if (objWsItem != null && objWsItem.Project != null) { if (objWsItem.UpdateNew(new VideoInfoProvider().Get(Path.Combine(Settings.NewDirectory, Request.ProjectSourceName)))) { return(new GetStatusResponse(Request, new List <Data.WorkspaceItem>() { objWsItem.GetWorkspaceItem() })); } return(new GetStatusResponse(Request, new ResponseStatus(ResponseState.Error, "File not found"))); } return(new GetStatusResponse(Request, new ResponseStatus(ResponseState.Error, "Project not found"))); }