Wednesday, June 14, 2017

Re: [google-cloud-sql-discuss] How do i poll the response coming from an instance creation using cloud sql admin api for java

Hi,

Our Java client library does not provide automatic polling or an observable-like interface. You will need to poll the API, repeatedly calling sqladmin.operations().get(project, operation_saved_from_create_request).execute().getStatus() every minute or so until it returns RUNNING.  Some Java frameworks might support doing this for you, but we don't supply that.

David

On Tue, Jun 13, 2017 at 8:01 AM, Iyenemi Tyger <tyger2007@gmail.com> wrote:
Hi and good day ,
I used the cloud sql admin api for java in my cloud endpoints project to create an instance based on the architecture of my solution instances will be created per user (dont know if there are instance creation limits on google cloud sql ). The next issue for me is that i have been able to create the instance however i want to be able to track the status of the instance creation . I can normally use Operations and then call the .getStatus method but it is not done like an observable it just executes and it returns pending , i want to be able to track when it is done .So i can maybe send the user an email .

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/20330541-149a-4835-907e-9fb9ed1c3bdb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/CAJZK_bajMk7VLx_QcxDGY_GXC4B6SNRAuL2bFJUJ_Debaio6gQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment