@@ -53,7 +53,7 @@ public override void ExecuteCmdlet()
53
53
CollectionUsageDetailsResult detailsUsage = null ;
54
54
string locale = String . Empty ;
55
55
RemoteAppOperationStatusResult operationResult = null ;
56
- int maxRetryCount = 600 ;
56
+ int maxRetryCount = 60 ;
57
57
58
58
if ( String . IsNullOrWhiteSpace ( UsageMonth ) )
59
59
{
@@ -77,12 +77,13 @@ public override void ExecuteCmdlet()
77
77
// The request is async and we have to wait for the usage details to be produced here
78
78
do
79
79
{
80
+
80
81
System . Threading . Thread . Sleep ( 5000 ) ;
81
82
82
83
operationResult = CallClient ( ( ) => Client . OperationResults . Get ( detailsUsage . UsageDetails . OperationTrackingId ) , Client . OperationResults ) ;
83
84
}
84
- while ( operationResult . RemoteAppOperationResult . Status != RemoteAppOperationStatus . Success ||
85
- operationResult . RemoteAppOperationResult . Status != RemoteAppOperationStatus . Failed ||
85
+ while ( operationResult . RemoteAppOperationResult . Status != RemoteAppOperationStatus . Success &&
86
+ operationResult . RemoteAppOperationResult . Status != RemoteAppOperationStatus . Failed &&
86
87
-- maxRetryCount > 0 ) ;
87
88
88
89
if ( operationResult . RemoteAppOperationResult . Status == RemoteAppOperationStatus . Success )
@@ -104,7 +105,9 @@ public override void ExecuteCmdlet()
104
105
else if ( maxRetryCount <= 0 )
105
106
{
106
107
ErrorRecord error = RemoteAppCollectionErrorState . CreateErrorRecordFromString (
107
- Commands_RemoteApp . RequestTimedOut ,
108
+ String . Format ( System . Globalization . CultureInfo . InvariantCulture ,
109
+ Commands_RemoteApp . RequestTimedOutFormat ,
110
+ detailsUsage . UsageDetails . OperationTrackingId ) ,
108
111
String . Empty ,
109
112
Client . Collections ,
110
113
ErrorCategory . OperationTimeout ) ;
0 commit comments