[Notes] [Git][BuildStream/buildstream][Qinusty/skipped-rework] cascache.py: Modify messaging API calls



Title: GitLab

Qinusty pushed to branch Qinusty/skipped-rework at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • buildstream/_artifactcache/cascache.py
    ... ... @@ -229,7 +229,7 @@ class CASCache(ArtifactCache):
    229 229
                 try:
    
    230 230
                     remote.init()
    
    231 231
     
    
    232
    -                element.info("Pulling {} <- {}".format(element._get_brief_display_key(), remote.spec.url))
    
    232
    +                element.status("Pulling {} <- {}".format(element._get_brief_display_key(), remote.spec.url))
    
    233 233
     
    
    234 234
                     request = buildstream_pb2.GetReferenceRequest()
    
    235 235
                     request.key = ref
    
    ... ... @@ -251,11 +251,8 @@ class CASCache(ArtifactCache):
    251 251
                         raise ArtifactError("Failed to pull artifact {}: {}".format(
    
    252 252
                             element._get_brief_display_key(), e)) from e
    
    253 253
                     else:
    
    254
    -                    self.context.message(Message(
    
    255
    -                        None,
    
    256
    -                        MessageType.INFO,
    
    257
    -                        "Remote ({}) does not have {} cached".format(
    
    258
    -                            remote.spec.url, element._get_brief_display_key())
    
    254
    +                    element.info("Remote ({}) does not have {} cached".format(
    
    255
    +                        remote.spec.url, element._get_brief_display_key()
    
    259 256
                         ))
    
    260 257
     
    
    261 258
             return False
    
    ... ... @@ -336,17 +333,13 @@ class CASCache(ArtifactCache):
    336 333
     
    
    337 334
             for remote in push_remotes:
    
    338 335
                 remote.init()
    
    339
    -
    
    340
    -            element.info("Pushing {} -> {}".format(element._get_brief_display_key(), remote.spec.url))
    
    336
    +            element.status("Pushing {} -> {}".format(element._get_brief_display_key(), remote.spec.url))
    
    341 337
     
    
    342 338
                 if self._push_refs_to_remote(refs, remote):
    
    343 339
                     pushed = True
    
    344 340
                 else:
    
    345
    -                self.context.message(Message(
    
    346
    -                    None,
    
    347
    -                    MessageType.INFO,
    
    348
    -                    "Remote ({}) already has {} cached".format(
    
    349
    -                        remote.spec.url, element._get_brief_display_key())
    
    341
    +                element.info("Remote ({}) already has {} cached".format(
    
    342
    +                    remote.spec.url, element._get_brief_display_key()
    
    350 343
                     ))
    
    351 344
     
    
    352 345
             return pushed
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]