Ejemplo n.º 1
0
        public AnalysisEntity GetAnalysis(Guid queryId)
        {
            var entity = _tableStorageProvider.GetEntity <AnalysisEntity>(AnalysisEntity.AllUsersPk, queryId.ToString());

            if (entity == null)
            {
                return(null);
            }

            try
            {
                var job = _batchClient.JobOperations.GetJob(entity.JobId);

                if (job.ExecutionInformation != null && job.ExecutionInformation.PoolId != null)
                {
                    entity.PoolId = job.ExecutionInformation.PoolId;
                }
            }
            catch (BatchException be)
            {
                if (be.RequestInformation.HttpStatusCode != HttpStatusCode.NotFound)
                {
                    throw;
                }
            }

            return(entity);
        }
Ejemplo n.º 2
0
        private void ValidateNoImportsInProgress(string databaseName)
        {
            var existingEntity = _tableStorageProvider.GetEntity <DatabaseEntity>(DatabaseEntity.DefaultRepository, databaseName);

            if (existingEntity != null && existingEntity.ImportInProgress)
            {
                // Ensure we don't already have one
                throw new Exception("Import already in progress for database: " + databaseName);
            }
        }
Ejemplo n.º 3
0
 public DatabaseEntity GetDatabase(string databaseName)
 {
     return(_tableStorageProvider.GetEntity <DatabaseEntity>(DatabaseEntity.DefaultRepository, databaseName));
 }
Ejemplo n.º 4
0
 public ExternalRepository GetRepository(string repoId)
 {
     return(HydrateEntity(_tableStorageProvider.GetEntity <ExternalRepository>(ExternalRepository.DefaultPk, repoId)));
 }
Ejemplo n.º 5
0
        public ClassEntity GetSingleClass([FromRoute] string rowKey)
        {
            ClassEntity resultEntity = classTableStorage.GetEntity(rowKey);

            return(resultEntity);
        }