public when_configuring_daemon_using_dsl()
        {
            test_event = new DSLTestEvent(new Categorisation("TEST"), Guid.Empty);

            publisher = new Publisher();

            var factory = new DslFactory
            {
                BaseDirectory = AppDomain.CurrentDomain.BaseDirectory,
            };
            factory.Register<BaseDaemonConfigurationDSL>(new BaseDaemonConfigurationDSLEngine());

            var dsl = factory.Create<BaseDaemonConfigurationDSL>("configuration.boo");
            dsl.Prepare();
            dsl.Execute();
        }
        public void Execute(IJobExecutionContext context)
        {
            var events = eventProvider.GetEvents();

            log.DebugFormat("Found {0} events to republish", events.Count);

            var publisher = new Publisher();

            using(var connection = new SqlConnection(ConfigurationManager.ConnectionStrings["puppy.sqlserver"].ConnectionString))
            {
                connection.Open();

                foreach (var @event in events)
                {
                    publisher.Publish(@event);
                    connection.Execute("UPDATE reportingEvent SET Republished = 1 WHERE Id = @id", new { id = @event.Id });
                }
            }
        }