
                          n    S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	   " S S\R                  5      rg	)
z"The `app operations wait` command.    )appengine_api_client)operations_util)base)log)progress_trackerc                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	Wait   z$Polls an operation until completion.EXAMPLESzr          To wait for an App Engine operation called o1 to complete, run:

              $ {command} o1
          c                 $    U R                  SSS9  g )N	operationzID of operation.)help)add_argument)parsers    "lib/surface/app/operations/wait.pyArgs	Wait.Args%   s    
*<=    c                     [         R                  " U R                  5       5      nUR                  UR                  5      nUR
                  (       a:  [        R                  R                  SR                  UR                  5      5        U$ [        R                  " SR                  UR                  5      5         [        R                  " UR                  R                  U5      sS S S 5        $ ! , (       d  f       g = f)Nz Operation [{0}] is already done.z(Waiting for operation [{0}] to complete.)r   GetApiClientForTrackReleaseTrackGetOperationr   doner   statusPrintformatr   ProgressTrackerr   WaitForOperationclientapps_operations)selfargs
api_clientr   s       r   RunWait.Run)   s    %::4;L;L;NOJ''7I~~	jj
,
3
3DNN
CE++
4
;
;DNN
KM//--y:M M Ms   :+C//
C= N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r$   __static_attributes__r&   r   r   r	   r	      s/    ,  - > >:r   r	   N)r+   googlecloudsdk.api_lib.appr   r   googlecloudsdk.callioper   googlecloudsdk.corer   googlecloudsdk.core.consoler   Commandr	   r&   r   r   <module>r4      s+     ) < 6 ( # 8:4<< :r   