public bool CheckAppCompletion(string jobId, string jobId2) { var _srv = new SqApiServiceFacade(Options.ApiUrl); var _appStatus = _srv.CheckAppChainStatus(Convert.ToInt64(jobId)); var _appStatus2 = _srv.CheckAppChainStatus(Convert.ToInt64(jobId2)); if (_appStatus == "Completed" && _appStatus2 == "Completed") { return(true); } return(false); }
private Tuple <long, long> GetJobId(SendInfo info) { var _srv = new SqApiServiceFacade(Options.ApiUrl, info.UserName); var _rs = _srv.StartAppChain(SqApiServiceFacade.MELANOMA_APP_CHAIN_ID, new Dictionary <string, string> { { "dataSourceId", info.DataFileId } }); var _rs2 = _srv.StartAppChain(SqApiServiceFacade.VITD_APP_CHAIN_ID, new Dictionary <string, string> { { "dataSourceId", info.DataFileId } }); while (true) { var _appStatus = _srv.CheckAppChainStatus(Convert.ToInt64(_rs.jobId)); var _appStatus2 = _srv.CheckAppChainStatus(Convert.ToInt64(_rs2.jobId)); if (_appStatus == "Completed" && _appStatus2 == "Completed") { break; } Thread.Sleep(5000); } return(Tuple.Create(_rs.jobId, _rs2.jobId)); }