You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
607 B
22 lines
607 B
using BackGround.Hangfire.Jobs.Units; |
|
using Hangfire; |
|
using Infrastructure.Abstructions; |
|
using System; |
|
using System.Collections.Generic; |
|
using System.Text; |
|
|
|
namespace BackGround.Hangfire.JobRegisters.Units |
|
{ |
|
public class ImportJobRegister: ITransientDependency |
|
{ |
|
private readonly IImportUnitsJob _importUnitsJob; |
|
public ImportJobRegister(IImportUnitsJob importUnitsJob) |
|
{ |
|
_importUnitsJob = importUnitsJob; |
|
} |
|
public void Register(Guid fileId) |
|
{ |
|
BackgroundJob.Enqueue(() => _importUnitsJob.Execute(fileId)); |
|
} |
|
} |
|
}
|
|
|