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

Raise exception in case of duplicated trigger in xml #745

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

siyamandayubi
Copy link

Currently, in case of multiple triggers with the same name in xml files, Quartz ignores the first ones
which misleading us why the first triggers didn't fire. In such case, the xml config
is invalid and qaurtz should raises exception, so that we will know what is wrong

Currently, in case of two triggers with the same name, Quartz ignores the first trigger
which misleading us why the first trigger didn't fire. In such case, the xml config
is invalid and qaurtz should raises exception
@@ -405,6 +407,13 @@ protected virtual void ProcessInternal(string xml)
}
}

// check for triggers with the same name
var duplicatedTriggers = triggerEntries.GroupBy(c => c.Item.name).Where(c => c.Count() > 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the grouping should be done using name and group? Trigger's identity is based on both name and group.

Base automatically changed from master to main January 23, 2021 17:31
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 this pull request may close these issues.

None yet

2 participants