예제 #1
0
        public static async Task OnBuildComplete(
            [QueueTrigger("build-complete", Connection = "AzureWebJobsStorage")] string message,
            ILogger logger)
        {
            var buildId = int.Parse(message);

            logger.LogInformation($"Processing build {buildId}");
            var connectionString = Environment.GetEnvironmentVariable("SQL_CONNECTION_STRING");

            using var cloneTimeUtil = new CloneTimeUtil(connectionString, logger);
            if (await cloneTimeUtil.IsBuildUploadedAsync(buildId))
            {
                logger.LogInformation($"Build {buildId} is already uploaded");
                return;
            }
            await cloneTimeUtil.UploadBuildAsync(buildId);
        }
예제 #2
0
 private static async Task UploadCloneTime()
 {
     using var util = new CloneTimeUtil(await GetToken("scratch-db"));
     await util.UpdateDatabaseAsync();
 }