Esempio n. 1
0
        public AnalyticsRunController(IAppConfig config,
                                      IJobProxy jobProxy,
                                      IIAM iam,
                                      ILogging logging,
                                      ITaskLogging taskLogging,
                                      IValidation validation,
                                      IWorkStatusProxy workStatusProxy)
        {
            _config = config;

            _iam             = iam;
            _jobProxy        = jobProxy;
            _logging         = logging;
            _taskLogging     = taskLogging;
            _validation      = validation;
            _workStatusProxy = workStatusProxy;
        }
Esempio n. 2
0
        public IActionResult TestLongRunning([FromServices] IDataClient dataClient, [FromServices] IIAM iam, string customerShortName, string projectShortName, int timeout)
        {
            var parameters = new List <NpgsqlParameter>
            {
                new NpgsqlParameter("v_timeout", NpgsqlDbType.Integer)
                {
                    Value = timeout
                },
            };

            var projectConfig = iam.GetProjectConfig(customerShortName, projectShortName);
            var request       = new GreenplumStoredProcedureRequest(projectConfig.GreenplumConfig.RawConnectionString, "usp_timeout_test", parameters);

            var stopWatch = Stopwatch.StartNew();

            dataClient.ExecuteScalar <object>(request);

            _logging.Log($"Long-running-test ran for: { stopWatch.Elapsed }");
            return(Ok());
        }