Skip to content

optimize alarm related #557

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

Merged
merged 5 commits into from
Apr 22, 2025
Merged

optimize alarm related #557

merged 5 commits into from
Apr 22, 2025

Conversation

yanhom1314
Copy link
Collaborator

No description provided.

@yanhom1314 yanhom1314 requested a review from Copilot April 22, 2025 14:39
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR focuses on optimizing alarm-related functionalities across the codebase. Key changes include relocating the destroy method in AlarmManager, updating the filter order in SilentCheckFilter, and reducing the default alarm count threshold in NotifyItem.

Reviewed Changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
starter-extension-notify-email/.../NotifyEmailAutoConfiguration.java Minor cleanup by removing an extra line.
core/notifier/manager/AlarmManager.java Relocated the destroy() method to a new section in the file.
core/notifier/chain/invoker/AlarmInvoker.java Removed unnecessary type casting for cleaner context access.
core/notifier/chain/filter/SilentCheckFilter.java Updated getOrder() method and changed the AlarmLimiter API call.
core/notifier/chain/filter/BaseAlarmFilter.java Refactored alarm count verification logic and renamed a parameter.
core/notifier/alarm/AlarmLimiter.java Renamed ifAlarm() to isAllowed() for clarity.
core/notifier/alarm/AlarmCounter.java Removed unused methods and repositioned getLastAlarmTime().
common/entity/NotifyItem.java Lowered the default alarm count threshold from 2 to 1.
.github/workflows/build-jvmti.yml Changed runner from ubuntu-20.04 to ubuntu-latest.
Files not reviewed (2)
  • dependencies/pom.xml: Language not supported
  • pom.xml: Language not supported
Comments suppressed due to low confidence (3)

core/src/main/java/org/dromara/dynamictp/core/notifier/chain/filter/SilentCheckFilter.java:45

  • The filter order value has been changed from 2 to 5. Please verify that this adjustment aligns with the intended notification sequence and does not introduce ordering side effects.
return 5;

common/src/main/java/org/dromara/dynamictp/common/entity/NotifyItem.java:159

  • The default alarm count threshold has been reduced from 2 to 1. Confirm that this change meets the intended alarm optimization requirements.
setIfZero(item::getCount, item::setCount, 1);

core/src/main/java/org/dromara/dynamictp/core/notifier/manager/AlarmManager.java:183

  • The destroy() method has been relocated within the file. Please ensure that the new placement maintains the correct lifecycle management for the ALARM_EXECUTOR.
public static void destroy() {

@yanhom1314 yanhom1314 merged commit 77ccfad into dromara:master Apr 22, 2025
1 check passed
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.

1 participant