Closed qwertybba closed 8 months ago
I did my test with an inmem storage, as it easier to setup. Please verify it as well and post the problematic sample
I did my test with an inmem storage, as it easier to setup. Please verify it as well and post the problematic sample
Unfortunately, I got the same result github simple InMemoryStorage.zip
it should be easier to repro if in mem though
it should be easier to repro if in mem though
I'm sorry, but I don't understand. I have already provided the simples with InMemoryStorage
It also appears that two servers have been created with the same name and port, but different GUIDs
After creating an Execute Action Job and triggering it the job works fine but it is not appearing in the Workers list view (The view has been refreshed) I tried several jobs all with the same result.
looks same https://github.com/eXpandFramework/eXpand/issues/992#issuecomment-1519961370
It also appears that two servers have been created with the same name and port
posible u used the AddHangfire twice the module is calling the method use GlobalConfiguration.Configuration
instead
The Hangfire dashboard can still be accessed
fixed in next minor
First of all, I really appreciate the time and effort you put into this project.
It also appears that two servers have been created with the same name and port
posible u used the AddHangfire twice the module is calling the method use
GlobalConfiguration.Configuration
insteadRegarding getting two servers, I've tried different methods without success Method 01: I installed InMemory package
<PackageReference Include="Hangfire.InMemory" Version="0.3.7" />
in Startup class I added this codeGlobalConfiguration.Configuration.UseInMemoryStorage();
Method 02: I installed MemoryStorage package
<PackageReference Include="Hangfire.MemoryStorage" Version="1.7.0" />
in Startup class I added this code
GlobalConfiguration.Configuration.UseMemoryStorage();
Method 03: I installed PostgreSql package
<PackageReference Include="Hangfire.PostgreSql" Version="1.19.12" />
in Startup class I added this code
var hangFireConnection = Configuration.GetConnectionString("HangfireConnection");
GlobalConfiguration.Configuration.UsePostgreSqlStorage(hangFireConnection);
do you have the AddHangfire call in your startup? remove it
do you have the AddHangfire call in your startup? remove it
I don't have any AddHangfire call in my startup class
using DevExpress.ExpressApp.Security;
using DevExpress.ExpressApp.ApplicationBuilder;
using DevExpress.ExpressApp.Blazor.ApplicationBuilder;
using DevExpress.ExpressApp.Blazor.Services;
using DevExpress.Persistent.Base;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Components.Server.Circuits;
using DevExpress.ExpressApp.Xpo;
using XpandTest.Blazor.Server.Services;
using DevExpress.Persistent.BaseImpl.PermissionPolicy;
using DevExpress.ExpressApp.Core;
using Hangfire;
using Hangfire.PostgreSql;
using Hangfire.MemoryStorage;
using Xpand.Extensions.Blazor;
using Xpand.XAF.Modules.JobScheduler.Hangfire.Hangfire;
[assembly: HostingStartup(typeof(HostingStartup))]
[assembly: HostingStartup(typeof(HangfireStartup))]
[assembly: HostingStartup(typeof(Xpand.XAF.Modules.Blazor.BlazorStartup))]
namespace XpandTest.Blazor.Server;
public class Startup {
public Startup(IConfiguration configuration) {
Configuration = configuration;
}
public IConfiguration Configuration { get; }
public void ConfigureServices(IServiceCollection services) {
services.AddSingleton(typeof(Microsoft.AspNetCore.SignalR.HubConnectionHandler<>), typeof(ProxyHubConnectionHandler<>));
services.AddRazorPages();
services.AddServerSideBlazor();
services.AddHttpContextAccessor();
services.AddScoped<CircuitHandler, CircuitHandlerProxy>();
services.AddXaf(Configuration, builder => {
builder.UseApplication<XpandTestBlazorApplication>();
builder.Modules
.AddAuditTrailXpo()
.AddCloningXpo()
.AddConditionalAppearance()
.AddDashboards(options => {
options.DashboardDataType = typeof(DevExpress.Persistent.BaseImpl.DashboardData);
})
.AddFileAttachments()
.AddOffice()
.AddReports(options => {
options.EnableInplaceReports = true;
options.ReportDataType = typeof(DevExpress.Persistent.BaseImpl.ReportDataV2);
options.ReportStoreMode = DevExpress.ExpressApp.ReportsV2.ReportStoreModes.XML;
options.ShowAdditionalNavigation = true;
})
.AddStateMachine(options => {
options.StateMachineStorageType = typeof(DevExpress.ExpressApp.StateMachine.Xpo.XpoStateMachine);
})
.AddValidation()
.AddViewVariants(options => {
options.ShowAdditionalNavigation = true;
})
.Add<XpandTest.Module.XpandTestModule>()
.Add<XpandTestBlazorModule>();
builder.ObjectSpaceProviders
.AddSecuredXpo((serviceProvider, options) =>
{
string connectionString = null;
if (Configuration.GetConnectionString("ConnectionString") != null)
{
connectionString = Configuration.GetConnectionString("ConnectionString");
}
ArgumentNullException.ThrowIfNull(connectionString);
options.ConnectionString = connectionString;
options.ThreadSafe = true;
options.UseSharedDataStoreProvider = true;
})
.AddNonPersistent();
builder.Security
.UseIntegratedMode(options => {
options.RoleType = typeof(PermissionPolicyRole);
options.UserType = typeof(XpandTest.Module.BusinessObjects.ApplicationUser);
options.UserLoginInfoType = typeof(XpandTest.Module.BusinessObjects.ApplicationUserLoginInfo);
options.UseXpoPermissionsCaching();
})
.AddPasswordAuthentication(options => {
options.IsSupportChangePassword = true;
});
});
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(options => {
options.LoginPath = "/LoginPage";
});
GlobalConfiguration.Configuration.UseInMemoryStorage();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) {
if(env.IsDevelopment()) {
app.UseDeveloperExceptionPage();
}
else {
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. To change this for production scenarios, see: https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseRequestLocalization();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.UseXaf();
app.UseEndpoints(endpoints => {
endpoints.MapXafEndpoints();
endpoints.MapBlazorHub();
endpoints.MapFallbackToPage("/_Host");
endpoints.MapControllers();
});
}
}
in this project i see 1 server DXApplication4.zip
in this project i see 1 server DXApplication4.zip
Even with this project I have 2 servers, I have no clue where the problem is?
Hello; Now that I have upgraded to the latest version, all my problems have been resolved, and I only have one server. I appreciate your help a lot
<ItemGroup>
<PackageReference Include="Hangfire.InMemory" Version="0.4.0" />
<PackageReference Include="Xpand.XAF.Modules.JobScheduler.Hangfire" Version="4.222.10" />
</ItemGroup>
I would appreciate it if you could provide a link to the project that you used for creating Chain Jobs
ChainJobs I the next screencast:
1.We create a new ExecuteActionJob that will schedule the Email action for a Product. 2.We create a new ObjectStateNotificationJob for new Products. 3.We add a new ChainedJob to run te Email ExecuteActionJob after a successful with new Products execution of the ObjectStateNotification job. 4.We check the recipient email to verify that emails send for the new Products found.
The pre-release 4.222.11.0 in the Reactive.XAF lab
branch includes commits that relate to this task:
To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).
Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.
If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.
Thanks a lot for your contribution.
Closing issue for age. Feel free to reopen it at any time.
.Thank you for your contribution.
Hello; My configuration