Skip to content

Commit

Permalink
Merge branch 'master' into validation
Browse files Browse the repository at this point in the history
  • Loading branch information
lucabruno91 committed Mar 18, 2024
2 parents 50a6406 + 4db4d08 commit a356318
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 7 deletions.
10 changes: 8 additions & 2 deletions src/Abp.Azure/Azure/Storage/AzureStorageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Resources;
using System.Threading.Tasks;

namespace Abp.Azure.Storage
Expand Down Expand Up @@ -106,7 +105,14 @@ private async Task<BlobContainerClient> GetBlobContainerClient(string connection
return BlobContainer;
BlobContainer = new BlobContainerClient(connectionString, containerName);
await BlobContainer.CreateIfNotExistsAsync();

try
{
await BlobContainer.SetAccessPolicyAsync(PublicAccessType.Blob);
}
catch (Exception ex)
{
Console.Error.WriteLine(string.Format("Cannot change access type for blob {0}: {1}", containerName, ex.Message));
}
return BlobContainer;
}

Expand Down
1 change: 1 addition & 0 deletions src/Abp.BusConsumer/BusConsumerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public string[] TopicList
public string Username { get; set; }
public string Password { get; set; }
public string Queue { get; set; }
public bool MustDeclareBindings { get; set; }
#endregion
}
}
5 changes: 5 additions & 0 deletions src/Abp.BusConsumer/Configuration/BusConfigurationProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,10 @@ public string GetQueue()

return _busSettings.Value.Queue;
}

public bool MustDeclareBindings()
{
return _busSettings.Value.MustDeclareBindings;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public interface IBusConfigurationProvider
string GetVirtualHost();
string GetExchange();
string GetQueue();
bool MustDeclareBindings();

}
}
13 changes: 8 additions & 5 deletions src/Abp.BusConsumer/RabbitMq/RabbitMqConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,15 @@ IConsumerService consumerService
var q = _channel.QueueDeclarePassive(_busConfigurationProvider.GetQueue());

//Create the binding if not present
_channel.QueueBind(q.QueueName, _busConfigurationProvider.GetExchange(), "status.brn.*.links.*");
_channel.QueueBind(q.QueueName, _busConfigurationProvider.GetExchange(), "status.propagator.*.links.#");
_channel.QueueBind(q.QueueName, _busConfigurationProvider.GetExchange(), "status.pwm.*.links.#");
if (_busConfigurationProvider.MustDeclareBindings())
{
_channel.QueueBind(q.QueueName, _busConfigurationProvider.GetExchange(), "status.brn.*.links.*");
_channel.QueueBind(q.QueueName, _busConfigurationProvider.GetExchange(), "status.propagator.*.links.#");
_channel.QueueBind(q.QueueName, _busConfigurationProvider.GetExchange(), "status.pwm.*.links.#");

_channel.QueueBind(q.QueueName, _busConfigurationProvider.GetExchange(), "notification.sem.astro");
_channel.QueueBind(q.QueueName, _busConfigurationProvider.GetExchange(), "event.camera.#");
_channel.QueueBind(q.QueueName, _busConfigurationProvider.GetExchange(), "notification.sem.astro");
_channel.QueueBind(q.QueueName, _busConfigurationProvider.GetExchange(), "event.camera.#");
}
}

protected override Task ExecuteAsync(CancellationToken stoppingToken)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public virtual async Task<GetStatisticsOutput> GetStatistics(GetStatisticsInput
if (_session.LoggedUserPerson.OrganizationId.HasValue)
queryMapRequests = queryMapRequests.DataOwnership(new List<int>() { _session.LoggedUserPerson.OrganizationId.Value });
}
queryMapRequests = queryMapRequests.Where(x => x.Status != MapRequestStatusType.Canceled);
//////////////////////

//Alerts///////////
Expand Down
4 changes: 4 additions & 0 deletions src/Ermes.Web/Release-Notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ Ver.
--------------------------------
- Feature - Delete of Organizations and persons (migration added)(permissions update)(#178)

Ver. 4.18.3 - 2024-03-13
--------------------------------
- Feature - Binding management update in BusConsumer module (appsettings update)

Ver. 4.18.2 - 2024-02-13
--------------------------------
- Feature - New API for person action batch insert added (#176)
Expand Down

0 comments on commit a356318

Please sign in to comment.