Comment 5 for bug 1627865

Revision history for this message
Facundo Batista (facundo) wrote :

The process of uploading is not synchronous, so after pushing a new upload, the client must "wait some time" before it can do the release.

This can be done in a very deterministic way.

The push response returns a 'status_details_url'. The client can hit that rightaway, but should check the 'processed' field in its response: if True, the server side processing ended; if False, it should wait some seconds (1? 3? 5?) and try again (meanwhile, it can even log or inform the user using the 'code' field in the response.

Note that after processing is done, it may not be able to release. The client should check the 'can_release' field in the response of the status_details_url: if False it has the 'errors' field with information for the user; if True it can proceed to the proper release.

The whole dance can be seen in the test_macaroons,py script (see lines 495-525 in http://bazaar.launchpad.net/~facundo/+junk/random/view/head:/test_macaroons.py ).

Any doubt, just ask!

Thanks,