コード例 #1
0
        public static async Task <IActionResult> Run(
            [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
            ILogger log)
        {
            log.LogInformation($"HttpDelete function processed");

            var connectionString = Environment.GetEnvironmentVariable("AZURE_STORAGE_CONNECTION_STRING");
            var service          = new StorageQueueService(connectionString, "");

            await service.Get();

            return(new OkResult());
        }
コード例 #2
0
        public static async Task <IActionResult> Run(
            [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
            ILogger log)
        {
            log.LogInformation($"HttpRegister function processed");
            var body = await req.GetBodyAsync <UserRequest>();

            var connectionString = Environment.GetEnvironmentVariable("AZURE_STORAGE_CONNECTION_STRING");
            var service          = new StorageQueueService(connectionString, "");

            await service.Insert(JsonConvert.SerializeObject(body.Value));

            return(new OkResult());
        }
コード例 #3
0
        /**
         * Add a message to the queue to publish all content.
         * This should only be used in development!
         */
        private void PublishAllContent(ILogger logger)
        {
            const string queueName = PublishAllContentQueue;

            try
            {
                var publisherConnectionString = Configuration.GetValue <string>("PublisherStorage");
                var storageQueueService       = new StorageQueueService(publisherConnectionString);
                storageQueueService.AddMessage(queueName, new PublishAllContentMessage());

                logger.LogInformation($"Message added to {queueName} queue");
                logger.LogInformation("Please ensure the Publisher function is running");
            }
            catch
            {
                logger.LogError($"Unable add message to {queueName} queue");
                throw;
            }
        }
コード例 #4
0
 public VacancyIndexScheduler(StorageQueueService service)
     : base(SchedulerFunctionConstants.QueueNames.VacancyIndexSchedulerQueueName, service)
 {
 }
 public SavedSearchScheduler(StorageQueueService service)
     : base(SchedulerFunctionConstants.QueueNames.SavedSearchSchedulerQueueName, service)
 {
 }
 public DailyDigestScheduler(StorageQueueService service)
     : base(SchedulerFunctionConstants.QueueNames.DailyDigestSchedulerQueueName, service)
 {
 }
 public LegacyDatabaseHousekeepingScheduler(StorageQueueService service)
     : base(SchedulerFunctionConstants.QueueNames.LegacyDatabaseHousekeepingQueueName, service)
 {
 }
コード例 #8
0
 public VacancyStatusProcessScheduler(StorageQueueService service)
     : base(SchedulerFunctionConstants.QueueNames.VacancyStatusSchedulerQueueName, service)
 {
 }
 public ReferenceDataScheduler(StorageQueueService service)
     : base(SchedulerFunctionConstants.QueueNames.ReferenceDataSchedulerQueueName, service)
 {
 }
 public HouseKeepingScheduler(StorageQueueService service)
     : base(SchedulerFunctionConstants.QueueNames.HouseKeepingSchedulerQueueName, service)
 {
 }
 public GeoCodeScheduler(StorageQueueService service)
     : base(SchedulerFunctionConstants.QueueNames.GeoCodeSchedulerQueueName, service)
 {
 }
コード例 #12
0
 public SchedulerBase(string queueName, StorageQueueService service)
 {
     QueueName = queueName;
     _service  = service;
 }
コード例 #13
0
 public ContactImageController(ImageRepository repository, StorageQueueService service)
 {
     _repository = repository;
     _service = service;
 }