#481 Do not run find_images_to_rebuild 10 times.
Merged 4 years ago by gnaponie. Opened 4 years ago by jkaluza.
jkaluza/freshmaker fixes-v1  into  master

@@ -31,16 +31,15 @@ 

  app_context = app.app_context()

  app_context.__enter__()

  

- for i in range(10):

-     db.drop_all()

-     db.create_all()

-     db.session.commit()

- 

-     errata = Errata()

-     event = ErrataAdvisoryStateChangedEvent(

-         "fake_message", ErrataAdvisory.from_advisory_id(errata, sys.argv[1]),

-         dry_run=True)

- 

-     handler = RebuildImagesOnRPMAdvisoryChange()

-     with patch("freshmaker.consumer.get_global_consumer"):

-         handler.handle(event)

+ db.drop_all()

+ db.create_all()

+ db.session.commit()

+ 

+ errata = Errata()

+ event = ErrataAdvisoryStateChangedEvent(

+     "fake_message", ErrataAdvisory.from_advisory_id(errata, sys.argv[1]),

+     dry_run=True)

+ 

+ handler = RebuildImagesOnRPMAdvisoryChange()

+ with patch("freshmaker.consumer.get_global_consumer"):

+     handler.handle(event)

I remember I did this to debug some memory leak issues and it got committed by a mistake probably.

Commit a10ef8b fixes this pull-request

Pull-Request has been merged by gnaponie

4 years ago

Pull-Request has been merged by gnaponie

4 years ago