@@ -27,7 +27,8 @@ public interface IRunnerServer : IRunnerService
27
27
28
28
// Configuration
29
29
Task < TaskAgent > AddAgentAsync ( Int32 agentPoolId , TaskAgent agent ) ;
30
- Task DeleteAgentAsync ( int agentPoolId , int agentId ) ;
30
+ Task DeleteAgentAsync ( int agentPoolId , ulong agentId ) ;
31
+ Task DeleteAgentAsync ( ulong agentId ) ;
31
32
Task < List < TaskAgentPool > > GetAgentPoolsAsync ( string agentPoolName = null , TaskAgentPoolType poolType = TaskAgentPoolType . Automation ) ;
32
33
Task < List < TaskAgent > > GetAgentsAsync ( int agentPoolId , string agentName = null ) ;
33
34
Task < TaskAgent > ReplaceAgentAsync ( int agentPoolId , TaskAgent agent ) ;
@@ -48,7 +49,7 @@ public interface IRunnerServer : IRunnerService
48
49
Task < PackageMetadata > GetPackageAsync ( string packageType , string platform , string version , CancellationToken cancellationToken ) ;
49
50
50
51
// agent update
51
- Task < TaskAgent > UpdateAgentUpdateStateAsync ( int agentPoolId , int agentId , string currentState ) ;
52
+ Task < TaskAgent > UpdateAgentUpdateStateAsync ( int agentPoolId , ulong agentId , string currentState ) ;
52
53
}
53
54
54
55
public sealed class RunnerServer : RunnerService , IRunnerServer
@@ -232,12 +233,17 @@ public Task<TaskAgent> ReplaceAgentAsync(int agentPoolId, TaskAgent agent)
232
233
return _genericTaskAgentClient . ReplaceAgentAsync ( agentPoolId , agent ) ;
233
234
}
234
235
235
- public Task DeleteAgentAsync ( int agentPoolId , int agentId )
236
+ public Task DeleteAgentAsync ( int agentPoolId , ulong agentId )
236
237
{
237
238
CheckConnection ( RunnerConnectionType . Generic ) ;
238
239
return _genericTaskAgentClient . DeleteAgentAsync ( agentPoolId , agentId ) ;
239
240
}
240
241
242
+ public Task DeleteAgentAsync ( ulong agentId )
243
+ {
244
+ return DeleteAgentAsync ( 0 , agentId ) ; // agentPool is ignored server side
245
+ }
246
+
241
247
//-----------------------------------------------------------------
242
248
// MessageQueue
243
249
//-----------------------------------------------------------------
@@ -303,7 +309,7 @@ public Task<PackageMetadata> GetPackageAsync(string packageType, string platform
303
309
return _genericTaskAgentClient . GetPackageAsync ( packageType , platform , version , cancellationToken : cancellationToken ) ;
304
310
}
305
311
306
- public Task < TaskAgent > UpdateAgentUpdateStateAsync ( int agentPoolId , int agentId , string currentState )
312
+ public Task < TaskAgent > UpdateAgentUpdateStateAsync ( int agentPoolId , ulong agentId , string currentState )
307
313
{
308
314
CheckConnection ( RunnerConnectionType . Generic ) ;
309
315
return _genericTaskAgentClient . UpdateAgentUpdateStateAsync ( agentPoolId , agentId , currentState ) ;
0 commit comments