-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Small runner code cleanup. #3773
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
Conversation
@@ -63,8 +65,7 @@ public async Task<CreateSessionResult> CreateSessionAsync(CancellationToken toke | |||
|
|||
// Create connection. | |||
Trace.Info("Loading Credentials"); | |||
var credMgr = HostContext.GetService<ICredentialManager>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this to class level, since we will going to reuse it later.
@@ -329,7 +330,7 @@ public async Task<TaskAgentMessage> GetNextMessageAsync(CancellationToken token) | |||
} | |||
} | |||
|
|||
public async Task RefreshListenerTokenAsync(CancellationToken cancellationToken) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the CancellationToken cancellationToken
from the interface method since no one is using it.
var configManager = HostContext.GetService<IConfigurationManager>(); | ||
_settings = configManager.LoadSettings(); | ||
|
||
if (string.IsNullOrEmpty(_settings.ServerUrlV2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need to check this again, we are in BrokerMessageListener only if we have the ServerUrlV2 in the first place.
In prepare for my up coming change, I am making small changes to reduce future PR's diff.