Exemplo n.º 1
0
        public static IDataFlowConnection CreateConnection(string jobManagerConfigurationName, string repositoryConfigurationName)
        {
            var repositoryClientFactory = new RepositoryClientFactory();
            var jobManagerClientFactory = new JobManagerClientFactory();

            return new DataFlowConnection(
                jobManagerClientFactory.CreateClient(JobManagerCallback, jobManagerConfigurationName),
                repositoryClientFactory.CreateClient(repositoryConfigurationName));
        }
Exemplo n.º 2
0
        public static IDataFlowConnection CreateDefaultConnection()
        {
            var repositoryClientFactory = new RepositoryClientFactory();
            var jobManagerClientFactory = new JobManagerClientFactory();

            return new DataFlowConnection(
                jobManagerClientFactory.CreateClient(JobManagerCallback),
                repositoryClientFactory.CreateClient());
        }
Exemplo n.º 3
0
        private static void ExecuteJob(Japi.Job job)
        {
            var stagesProvider = new StagesProvider();
            var repositoryClientFactory = new RepositoryClientFactory();
            var jobManagerClientFactory = new JobManagerClientFactory();

            using(var repository = repositoryClientFactory.CreateClient())
            {
                using(var jobManager = jobManagerClientFactory.CreateClient(new JobManagerCallback()))
                {
                    foreach(var stage in stagesProvider.Stages)
                    {
                        Console.WriteLine(stage.Name + "...");
                        stage.Execute(job, Console.WriteLine, repository, jobManager);
                    }
                }
            }
        }