예제 #1
0
        public override void Run()
        {
            using (Context context = ContextManager.Instance.CreateContext(ConnectionMode.AutoOpen, TransactionMode.AutoCommit))
            {
                EntityFactory ef = new EntityFactory(context);
                Federation    f  = (Federation)ef.LoadStronglyTypedEntity(Federation.AppSettings.FederationName);

                QueryFactory qf    = new SqlQueryFactory();
                QueryBase    query = qf.CreateQuery(File.ReadAllText(inputFile), ExecutionMode.Graywulf, outputTable, taskName);


                string      queuename = String.Format("{0}.{1}", f.ControllerMachine.GetFullyQualifiedName(), queueName);
                JobInstance job       = qf.ScheduleAsJob(query, queueName);
                job.Save();
            }
        }
예제 #2
0
        protected Guid ScheduleQueryJob(string query, QueueType queueType)
        {
            var queue = String.Format("QueueInstance:Graywulf.Controller.Controller.{0}", queueType.ToString());

            using (var context = ContextManager.Instance.CreateContext(ConnectionMode.AutoOpen, TransactionMode.AutoCommit))
            {
                SignInTestUser(context);

                var f = new SqlQueryFactory(context);

                var q  = f.CreateQuery(query);
                var ji = f.ScheduleAsJob(q, queue, "testjob");

                ji.Save();

                return(ji.Guid);
            }
        }
예제 #3
0
 public void SetUp()
 {
     _sqlQueryFactory = new SqlQueryFactory("test");
 }
예제 #4
0
 public void SetUp()
 {
     QueryFactory = new SqlQueryFactory("AdoExecutorTestDb");
     Query        = QueryFactory.CreateQuery();
 }
예제 #5
0
 public DatabaseObjectManager(string connectionString)
 {
     sqlClient       = new SqlClient(connectionString);
     sqlQueryFactory = new SqlQueryFactory();
 }