Skip to content

Commit

Permalink
updated the the lock and rabbit queue expirary
Browse files Browse the repository at this point in the history
  • Loading branch information
dbones committed Sep 12, 2021
1 parent 0a9f64a commit c8dc42c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class RabbitMqBusConfiguration : BusConfiguration
/// <summary>
/// how long a queue should stay before it is removed for inactivity
/// </summary>
public long ExpireQueueAfter { get; set; } = 3600000; //1 hour
public long ExpireQueueAfter { get; set; } = 28800000; //8 hours //3600000; //1 hour


/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Eventual.RabbitMq/Eventual.RabbitMq.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<PropertyGroup>
<Version>0.0.3</Version>
<Version>0.0.5</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Eventual/Eventual.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<PropertyGroup>
<Version>0.0.4</Version>
<Version>0.0.5</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
4 changes: 3 additions & 1 deletion src/Eventual/Infrastructure/Lock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

public class Lock
{
private readonly ReaderWriterLockSlim _internalLock = new ReaderWriterLockSlim();
private readonly ReaderWriterLockSlim _internalLock = new();

public void GetInsert(Func<bool> read, Action update)
{
Expand All @@ -16,6 +16,8 @@ public void GetInsert(Func<bool> read, Action update)
_internalLock.EnterWriteLock();
try
{
//do another check to be sure.
if (read()) return;
update();
}
finally
Expand Down

0 comments on commit c8dc42c

Please sign in to comment.