Skip to content

Commit

Permalink
Enabling installers so that error and audit gets created
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasohlund committed Mar 26, 2015
1 parent ad02b29 commit 4a96c1b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
13 changes: 7 additions & 6 deletions APIComparer.Backend/Functions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ public static void Host(TextWriter log, CancellationToken cancellationToken)
configuration.UseTransport<AzureStorageQueueTransport>()
.ConnectionString(AzureEnvironment.GetConnectionString);
configuration.UsePersistence<AzureStoragePersistence>();

var startableBus = Bus.Create(configuration);
startableBus.Start();
log.WriteLine("APIComparer.Backend - bus started");
configuration.EnableInstallers();

cancellationToken.WaitHandle.WaitOne();
using (Bus.Create(configuration).Start())
{
log.WriteLine("APIComparer.Backend - bus started");

cancellationToken.WaitHandle.WaitOne();
}

startableBus.Dispose();
log.WriteLine("APIComparer.Backend cancelled at " + DateTimeOffset.UtcNow);
}
}
Expand Down
8 changes: 4 additions & 4 deletions APIComparer.Website/BusConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public static class BusConfig
{
public static IBus Setup(ILifetimeScope container)
{
LogManager.Use<DefaultFactory>().Directory(@".\");

This comment has been minimized.

Copy link
@SeanFeldman

SeanFeldman Mar 28, 2015

Contributor

@andreasohlund should we log into a folder other than root? There's a %home%\LogFiles that is used for all other logs by Azure

This comment has been minimized.

Copy link
@andreasohlund

andreasohlund Mar 30, 2015

Author Owner

+1

This comment has been minimized.

Copy link
@SeanFeldman

SeanFeldman Mar 30, 2015

Contributor

Added issue #22


var configuration = new BusConfiguration();
configuration.EndpointName("APIComparer.Website");
configuration.UseContainer<AutofacBuilder>(x => x.ExistingLifetimeScope(container));
Expand All @@ -21,11 +23,9 @@ public static IBus Setup(ILifetimeScope container)
configuration.DisableFeature<SecondLevelRetries>();
configuration.DisableFeature<Sagas>();
configuration.DisableFeature<TimeoutManager>();
configuration.EnableInstallers();

LogManager.Use<DefaultFactory>().Directory(@".\");

var startableBus = Bus.Create(configuration);
return startableBus.Start();
return Bus.Create(configuration).Start();
}
}
}

0 comments on commit 4a96c1b

Please sign in to comment.