Hi,
to use hangfire, i do: Configuration.BackgroundJobs.UseHangfire(configuration => { configuration.GlobalConfiguration.UseSqlServerStorage("Default"); });
but how can i pass a queue configuration to hangfire as described below in the hangfire documentation: <a class="postlink" href="http://docs.hangfire.io/en/latest/background-processing/configuring-queues.html">http://docs.hangfire.io/en/latest/backg ... ueues.html</a>
thank's in advance martin
Hi,
to implement a custom api for external use i want to implement hmac authentification via a custom attribute like this:
namespace xxx.Api.Controllers
{
[Audited]
[MeHmacAuthentication]
public class ExportController : MeApiControllerBase
...
In a standalone mvc app all worked, but now i migrate the whole project to abp style.
In the implementation of the attribute i do: (McHmacAuthenticationAttribute is a common baseclass doing the most things)
namespace xxx.Authentication
{
public class MeHmacAuthenticationAttribute : McHmacAuthenticationAttribute
{
private readonly IMeApiKeyAppService _apikeyService;
public MeHmacAuthenticationAttribute(IMeApiKeyAppService apikeyService)
{
_apikeyService = apikeyService;
ListResultOutput<MeApiKeyListDto> keys = _apikeyService.GetKeys();
...
but _apikeyService does not get injected. I tried to manually register:
public class MeApiModule : AbpModule
{
public override void PreInitialize()
{
Configuration.BackgroundJobs.IsJobExecutionEnabled = false;
}
public override void Initialize()
{
IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
IocManager.Register<IMeApiKeyAppService, MeApiKeyAppService>(DependencyLifeStyle.Transient);
}
public override void PostInitialize()
{
base.PostInitialize();
}
but this did not change anything.
can you please guide me to thi right direction to do this
thanks in advance Martin
Hi,
thanks a lot - it works.
Now i ran into another problem. my main website should only start backgroundjobs and display it's progress etc. (including hangfire dashboard)
and a second "worker" website - hosted on another server should process the jobs.
so i tried:
Configuration.BackgroundJobs.IsJobExecutionEnabled = false;
in the website (webmodule->PreInitialize()) to prevent processing. But i seams that this setting is beeing ignored. Website is processing jobs too.
Is there another option to prevent processing jobs by hangfire? any hint for me?
best regards Martin
Hi,
i just want to implement a service that starts some background jobs via hangfire, so i do:
public class MeEmailService : MeAppServiceBase, IMeEmailService
{
protected IMeEmailSendService _SendService;
protected readonly ITenantSettingsAppService _TenantSettingsAppService;
protected readonly IBackgroundJobManager _backgroundJobManager;
public MeEmailService(ITenantSettingsAppService TenantSettingsAppService, IBackgroundJobManager backgroundJobManager)
{
_TenantSettingsAppService = TenantSettingsAppService;
_backgroundJobManager = backgroundJobManager;
...
But somthing is missing, because i get this error at runtime: An error has occurred.","exceptionMessage":"Can't create component 'Abp.BackgroundJobs.BackgroundJobStore' as it has dependencies to be satisfied.\r\n\r\n'Abp.BackgroundJobs.BackgroundJobStore' is waiting for the following dependencies:\r\n- Service 'Abp.Domain.Repositories.IRepository`2[[Abp.BackgroundJobs.BackgroundJobInfo, Abp, Version=0.11.1.0, Culture=neutral, PublicKeyToken=null],[System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' which was not registered.
any hint for me what i am missing?
best regards Martin
Hi,
i added some custom entities like that:
namespace xxx.EntityFramework
{
public class MeDbContext : AbpZeroDbContext<Tenant, Role, User>
{
/* Define an IDbSet for each entity of the application */
public virtual IDbSet<MeLogEntry> MeLogEntries { get; set; }
public virtual IDbSet<MeApiKey> MeApiKeys { get; set; }
public virtual IDbSet<MeBlacklist> MeBlackLists { get; set; }
...
Hi,
same problem when i try to inject the TenantAppService:
Can't create component '_1701apps.effairs.MultiTenancy.TenantManager' as it has dependencies to be satisfied.
'_1701apps.effairs.MultiTenancy.TenantManager' is waiting for the following dependencies:
I use the top-service (emailservice, wich then uses tenant an jobservice) from a ApiController - maybe this matters?
Hi,
i did not override OnModelCreating.
May it cause a problem that in the .application Project is another dbcontext (for some legacy reasons - we migrate an existing web-app)?
thanks for your help.
Hello there, I have set up a project using Single Deployment - Multi Database approach. I login using a tenant admin (the one that is created on creating a new tenant, and is stored in tenant database). Under Settings - Appearance, I should be able to upload a tenant-specific css/logo. However, when I try this, a DBUpdateException is thrown, because of the FK Constraint (Table Tenant -> LastModifierUserId). So basically the system tries to set the tenant admin-user as LastModifierUser on the Tenant-Row of the host table, but since this user only exists in the tenant-database, it cannot be set. How can I solve this issue now? Is this a bug in Abp? Or is my setup causing the issue?
Thanks in advance
Hey, thanks for your response. I am running Abp Version 2.0.2 here. What is the expected result anyway? If a tenant-user uploads a Css/Logo, which UserId should be set as LastModifiedUser?