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

feat: efm2 #371

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

feat: efm2 #371

wants to merge 5 commits into from

Conversation

joyc-bq
Copy link
Contributor

@joyc-bq joyc-bq commented Jan 16, 2025

Summary

Description

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@joyc-bq joyc-bq added the wip Pull requests that are a work in progress label Jan 16, 2025
@joyc-bq joyc-bq force-pushed the efm2 branch 3 times, most recently from 765f928 to cec0010 Compare January 22, 2025 02:11
@joyc-bq joyc-bq marked this pull request as ready for review January 22, 2025 18:22
@joyc-bq joyc-bq removed the wip Pull requests that are a work in progress label Jan 22, 2025
common/lib/plugins/efm2/monitor_service.ts Outdated Show resolved Hide resolved
common/lib/plugins/efm2/monitor.ts Outdated Show resolved Hide resolved
common/lib/plugins/efm2/monitor.ts Outdated Show resolved Hide resolved
common/lib/plugins/efm2/monitor.ts Outdated Show resolved Hide resolved
common/lib/plugins/efm2/monitor.ts Outdated Show resolved Hide resolved
common/lib/plugins/efm2/monitor.ts Outdated Show resolved Hide resolved
common/lib/plugins/efm2/monitor_service.ts Outdated Show resolved Hide resolved
common/lib/utils/locales/en.json Outdated Show resolved Hide resolved
common/lib/plugins/efm2/monitor.ts Outdated Show resolved Hide resolved
common/lib/plugins/efm2/monitor.ts Show resolved Hide resolved
common/lib/plugins/efm2/monitor.ts Show resolved Hide resolved
common/lib/plugins/efm2/monitor.ts Outdated Show resolved Hide resolved
common/lib/plugins/efm2/monitor.ts Outdated Show resolved Hide resolved
@joyc-bq joyc-bq force-pushed the efm2 branch 2 times, most recently from e7551a0 to 9c6277c Compare February 6, 2025 17:32
@karenc-bq
Copy link
Contributor

EFM and EFM2 seem to be missing a piece of code converting monitoring_xxx properties to xxx connection properties before calling checking connection status. Otherwise code look good to me.

Comment on lines +55 to +56
const val = this.clientToAbortRef?.deref() ?? null;
return val !== null;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is overcomplicated

Suggested change
const val = this.clientToAbortRef?.deref() ?? null;
return val !== null;
return !!this.clientToAbortRef?.deref()

*
* @param clientToAbort A reference to the connection associated with this context that will be aborted.
*/
constructor(clientToAbort: any) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The type of the client is known here, so we should not be using any

Suggested change
constructor(clientToAbort: any) {
constructor(clientToAbort: ClientWrapper) {

this.clientToAbortRef = null;
}

getClient(): ClientWrapper {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
getClient(): ClientWrapper {
getClient(): ClientWrapper | null {


export interface MonitorService {
startMonitoring(
clientToAbort: any,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
clientToAbort: any,
clientToAbort: ClientWrapper,

* @param context The {@link MonitorConnectionContext} representing a connection.
* @param clientToAbort A reference to the connection associated with this context that will be aborted.
*/
stopMonitoring(context: MonitorConnectionContext, clientToAbort: any): Promise<void>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
stopMonitoring(context: MonitorConnectionContext, clientToAbort: any): Promise<void>;
stopMonitoring(context: MonitorConnectionContext, clientToAbort: ClientWrapper): Promise<void>;

}

async startMonitoring(
clientToAbort: any,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
clientToAbort: any,
clientToAbort: ClientWrapper,

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.

4 participants