Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetTriggerBuilder does not support IgnoreMisfires misfire instruction #750

Closed
JonathanFortier-eaton opened this issue Apr 8, 2019 · 1 comment · Fixed by #884
Closed
Milestone

Comments

@JonathanFortier-eaton
Copy link

Version: 3.0.7

Expected behavior

When a Trigger uses IgnoreMisfires instruction, calling GetTriggerBuilder should return a TriggerBuilder set up with IgnoreMisfires instruction.

Actual behavior

GetTriggerBuilder returns a TriggerBuilder set up with SmartPolicy misfire instruction.

Steps to reproduce

ITrigger trigger1 = TriggerBuilder.Create()
    .WithSimpleSchedule(x => x
        .WithMisfireHandlingInstructionIgnoreMisfires())
    .Build();
ITrigger trigger2 = trigger1.GetTriggerBuilder().Build();
Console.WriteLine("trigger1.MisfireInstruction: {0}", trigger1.MisfireInstruction); // Prints -1
Console.WriteLine("trigger2.MisfireInstruction: {0}", trigger2.MisfireInstruction); // Prints 0

Problem seems to be in the implementation of GetScheduleBuilder() for every type of trigger: there is a "switch" that doen't take into account the case "Quartz.MisfireInstruction.IgnoreMisfirePolicy", so the misfire instruction stays to the default one.

@lahma
Copy link
Member

lahma commented Jul 14, 2020

Thanks for reporting. Will be part of final 3.1 and next 3.1 beta 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants