@@ -39,7 +39,6 @@ public void ApplyReport(AnnotationReport report)
39
39
_jsonWriter . Parse ( originalContent ) ;
40
40
41
41
var processedLambdaFunctions = new HashSet < string > ( ) ;
42
- var processedQueues = new HashSet < string > ( ) ;
43
42
44
43
foreach ( var lambdaFunction in report . LambdaFunctions )
45
44
{
@@ -49,21 +48,6 @@ public void ApplyReport(AnnotationReport report)
49
48
processedLambdaFunctions . Add ( lambdaFunction . Name ) ;
50
49
}
51
50
52
-
53
- //foreach (var queueModelSerializable in report.Queues)
54
- //{
55
- // if (!ShouldProcessQueue(queueModelSerializable))
56
- // continue;
57
- // ProcessQueue(queueModelSerializable, relativeProjectUri);
58
- // processedQueues.Add(queueModelSerializable.LogicalId);
59
-
60
- //}
61
-
62
- RemoveOrphanedLambdaFunctions ( processedLambdaFunctions ) ;
63
- RemoveOrphanedQueues ( processedQueues ) ;
64
-
65
-
66
-
67
51
var json = _jsonWriter . GetPrettyJson ( ) ;
68
52
_fileManager . WriteAllText ( report . CloudFormationTemplatePath , json ) ;
69
53
@@ -171,6 +155,7 @@ private void ProcessLambdaFunctionEventAttributes(ILambdaFunctionSerializable la
171
155
currentSyncedEvents . Add ( eventName ) ;
172
156
break ;
173
157
case AttributeModel < SqsMessageAttribute > sqsAttributeModel :
158
+ Debugger . Launch ( ) ;
174
159
eventName = ProcessSqsMessageAttribute ( lambdaFunction , sqsAttributeModel . Data ) ;
175
160
currentSyncedEvents . Add ( eventName ) ;
176
161
break ;
@@ -291,32 +276,6 @@ private void RemoveOrphanedLambdaFunctions(HashSet<string> processedLambdaFuncti
291
276
_jsonWriter . RemoveToken ( $ "Resources.{ resourceName } ") ;
292
277
}
293
278
}
294
- private void RemoveOrphanedQueues ( HashSet < string > processedQueues )
295
- {
296
- var resourceToken = _jsonWriter . GetToken ( "Resources" ) as JObject ;
297
- if ( resourceToken == null )
298
- return ;
299
-
300
- var toRemove = new List < string > ( ) ;
301
- foreach ( var resource in resourceToken . Properties ( ) )
302
- {
303
- var resourcePath = $ "Resources.{ resource . Name } ";
304
- var type = _jsonWriter . GetToken ( $ "{ resourcePath } .Type", string . Empty ) ;
305
- var creationTool = _jsonWriter . GetToken ( $ "{ resourcePath } .Metadata.Tool", string . Empty ) ;
306
-
307
- if ( string . Equals ( type . ToObject < string > ( ) , "AWS::SQS::Queue" , StringComparison . Ordinal )
308
- && string . Equals ( creationTool . ToObject < string > ( ) , "Amazon.Lambda.Annotations" , StringComparison . Ordinal )
309
- && ! processedQueues . Contains ( resource . Name ) )
310
- {
311
- toRemove . Add ( resource . Name ) ;
312
- }
313
- }
314
-
315
- foreach ( var resourceName in toRemove )
316
- {
317
- _jsonWriter . RemoveToken ( $ "Resources.{ resourceName } ") ;
318
- }
319
- }
320
279
321
280
private JToken GetValueOrRef ( string value )
322
281
{
0 commit comments