Skip to content

Commit

Permalink
preserve fix fro #468
Browse files Browse the repository at this point in the history
  • Loading branch information
johnml1135 committed Sep 10, 2024
1 parent ecde716 commit d7071ef
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ public class PostprocessBuildJob(
IDataAccessContext dataAccessContext,
IBuildJobService buildJobService,
ILogger<PostprocessBuildJob> logger,
ISharedFileService sharedFileService
ISharedFileService sharedFileService,
IOptionsMonitor<BuildJobOptions> options
) : HangfireBuildJob<(int, double)>(platformService, engines, dataAccessContext, buildJobService, logger)
{
protected ISharedFileService SharedFileService { get; } = sharedFileService;
private readonly BuildJobOptions _buildJobOptions = options.CurrentValue;

protected override async Task DoWorkAsync(
string engineId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,18 @@ public class SmtTransferPostprocessBuildJob(
IRepository<TrainSegmentPair> trainSegmentPairs,
ISmtModelFactory smtModelFactory,
ITruecaserFactory truecaserFactory,
IOptionsMonitor<BuildJobOptions> buildOptions,
IOptionsMonitor<SmtTransferEngineOptions> engineOptions
) : PostprocessBuildJob(platformService, engines, dataAccessContext, buildJobService, logger, sharedFileService)
)
: PostprocessBuildJob(
platformService,
engines,
dataAccessContext,
buildJobService,
logger,
sharedFileService,
buildOptions
)
{
private readonly ISmtModelFactory _smtModelFactory = smtModelFactory;
private readonly ITruecaserFactory _truecaserFactory = truecaserFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ public override object ActivateJob(Type jobType)
new MemoryDataAccessContext(),
_env.BuildJobService,
Substitute.For<ILogger<PostprocessBuildJob>>(),
_env.SharedFileService
_env.SharedFileService,
buildJobOptions
);
}
return base.ActivateJob(jobType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ public override object ActivateJob(Type jobType)
_env.TrainSegmentPairs,
_env.SmtModelFactory,
_env._truecaserFactory,
buildJobOptions,
engineOptions
);
}
Expand Down

0 comments on commit d7071ef

Please sign in to comment.