Skip to content

Commit

Permalink
Fix typos and import order
Browse files Browse the repository at this point in the history
  • Loading branch information
angrave committed Jan 28, 2024
1 parent e226d2a commit fda94dd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
16 changes: 9 additions & 7 deletions ClassTranscribeDatabase/Seed.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
using ClassTranscribeDatabase.Models;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;

using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;

using ClassTranscribeDatabase.Models;

namespace ClassTranscribeDatabase
{
Expand Down Expand Up @@ -60,7 +62,7 @@ public void Seed()
_logger.LogInformation($"Sleeping for {retrySeconds} seconds");
// Thread.Sleep(1000 * retrySeconds);

Task.Delay(TimeSpan.fromSeconds(retrySeconds)).Wait();
Task.Delay(TimeSpan.FromSeconds(retrySeconds)).Wait();

}
else
Expand Down
6 changes: 3 additions & 3 deletions ClassTranscribeDatabase/Services/RabbitMQConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private void CreateSharedConnection()
return;
}
var recovery = Convert.ToBoolean(Globals.appSettings.RABBITMQ_AUTOMATIC_RECOVERY);
var heartbeat = Convert.ToUInt32(Globals.appSettings.RABBITMQ_HEARTBEAT_SECONDS)
var heartbeat = Convert.ToUInt32(Globals.appSettings.RABBITMQ_HEARTBEAT_SECONDS);
Logger.LogInformation($"Creating RabbitMQ connection recovery:{recovery} heartbeat:{heartbeat}");
var factory = new ConnectionFactory()
{
Expand All @@ -72,8 +72,8 @@ private void CreateSharedConnection()
UserName = Globals.appSettings.ADMIN_USER_ID,
Password = Globals.appSettings.ADMIN_PASSWORD,
Port = Convert.ToUInt16(Globals.appSettings.RABBITMQ_PORT), // 5672
AutomaticRecoveryEnabled = recovery
RequestedHeartbeat = TimeSpan.fromSeconds( heartbeat)
AutomaticRecoveryEnabled = recovery,
RequestedHeartbeat = TimeSpan.FromSeconds(heartbeat)
};
// A developer may still want to checkout old code which uses the old env branch
// so just complain loudly for now
Expand Down
16 changes: 10 additions & 6 deletions TaskEngine/Program.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
using ClassTranscribeDatabase;
using ClassTranscribeDatabase.Services;
using ClassTranscribeDatabase.Services.MSTranscription;
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System;
using TaskEngine.Tasks;
using System.Threading;

using Newtonsoft.Json.Linq;

using static ClassTranscribeDatabase.CommonUtils;
using ClassTranscribeDatabase;
using ClassTranscribeDatabase.Services;
using ClassTranscribeDatabase.Services.MSTranscription;

using TaskEngine.Tasks;

namespace TaskEngine
{
Expand Down

0 comments on commit fda94dd

Please sign in to comment.