Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
filipbekic01 committed Oct 24, 2024
1 parent d4d4df0 commit f763d44
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 36 deletions.
2 changes: 1 addition & 1 deletion backend/ResQueue/ResQueue/ResQueue.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<!-- NuGet package properties -->
<PackageId>ResQueue.MassTransit</PackageId>
<Version>1.0.0-beta.10</Version>
<Version>1.0.0-beta.11</Version>
<Authors>Filip Bekić</Authors>
<Company>ResQueue</Company>
<Description>MassTransit SQL Transport Web UI</Description>
Expand Down
15 changes: 1 addition & 14 deletions backend/ResQueue/ResQueue/ResQueueExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public static IApplicationBuilder UseResQueue(this WebApplication app, string pr
string[] frontendRoutes =
[
"",
"/resqueue-ui",
];

app.UseRewriter(frontendRoutes.Aggregate(
Expand All @@ -60,16 +59,4 @@ public static IApplicationBuilder UseResQueue(this WebApplication app, string pr

return app;
}
}

// app.UseStaticFiles(new StaticFileOptions()
// {
// FileProvider = embeddedProvider,
// OnPrepareResponse = (context) =>
// {
// context.Context.Response.Headers.CacheControl =
// context.Context.Request.Path.StartsWithSegments("/assets")
// ? "public, max-age=31536000, immutable"
// : "no-cache, no-store";
// }
// });
}
16 changes: 2 additions & 14 deletions backend/ResQueue/WebSample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ public static void Main(string[] args)
policy.AllowCredentials();
});
});

builder.AddResQueue(opt =>
{
opt.PostgreSQLConnectionString =
"Host=localhost;Database=sandbox100;Username=postgres;Password=postgres;";
});

// Add services to the container.
builder.Services.AddOptions<SqlTransportOptions>().Configure(options =>
{
options.Host = "localhost";
Expand All @@ -43,9 +42,7 @@ public static void Main(string[] args)

builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

builder.Services.AddPostgresMigrationHostedService();

builder.Services.AddMarten(x =>
{
x.Connection("Host=localhost;Database=sandbox100;Username=postgres;Password=postgres;");
Expand All @@ -54,17 +51,12 @@ public static void Main(string[] args)
builder.Services.AddMassTransit(mt =>
{
mt.AddSqlMessageScheduler();

mt.SetMartenSagaRepositoryProvider();

mt.AddConsumer<YourConsumer>()
.Endpoint(e => { e.ConcurrentMessageLimit = 1; });

mt.AddConsumer<AwesomeConsumer>()
.Endpoint(e => { e.ConcurrentMessageLimit = 1; });

mt.AddJobSagaStateMachines();

mt.UsingPostgres((context, config) =>
{
config.UseSqlMessageScheduler();
Expand All @@ -76,11 +68,7 @@ public static void Main(string[] args)
app.UseCors("AllowAll");
app.UseSwagger();
app.UseSwaggerUI();

app.MapGet("/", () => "Hello World!");

app.UseResQueue();

app.UseResQueue("custom-prefix");
app.Run();
}
}
2 changes: 1 addition & 1 deletion backend/ResQueue/WebSample/WebSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageReference Include="MassTransit.SqlTransport.SqlServer" Version="8.3.1-develop.2089"/>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1"/>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1"/>
<PackageReference Include="ResQueue.MassTransit" Version="1.0.0-beta.10" />
<PackageReference Include="ResQueue.MassTransit" Version="1.0.0-beta.11" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.9.0"/>
</ItemGroup>
</Project>
12 changes: 6 additions & 6 deletions frontend/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,40 @@ const router = createRouter({
history: createWebHistory('/' + resqueueConfig.prefix),
routes: [
{
path: '/resqueue-ui',
path: '',
redirect: {
name: 'overview'
},
component: Broker,
children: [
{
path: '/resqueue-ui/overview',
path: '/overview',
name: 'overview',
props: true,
component: BrokerOverview
},
{
path: '/resqueue-ui/topics',
path: '/topics',
name: 'topics',
props: true,
component: BrokerTopics
},
{
path: '/resqueue-ui/queues',
path: '/queues',
name: 'queues',
props: true,
component: BrokerQueues
},
{
path: '/resqueue-ui/jobs',
path: '/jobs',
name: 'jobs',
props: true,
component: BrokerQueues
}
]
},
{
path: '/resqueue-ui/queues/:queueName',
path: '/queues/:queueName',
name: 'messages',
props: true,
component: Messages
Expand Down

0 comments on commit f763d44

Please sign in to comment.