Forums » Announcements Search

Deprecating 'wait=true' in track upload and analyze New Reply

Author Post
Posts: 1098
Registered: Sep 08, 2008

We are deprecating setting the 'wait' parameter to 'true' for the track methods analyze and upload. This parameter, when set to true, allows the client to wait for an analysis to be completed. Keeping a web connection open for an indeterminate amount of time is not always healthy - long-lived, open connections can use up resources and tend to be shutdown by proxies and firewalls, making for an unreliable API call. It is best practice to set 'wait' to false and to use track profile to check the status of the analysis (via the 'status' field returned in the track profile response). We want to make this best practice be the only way to do this, so we are going to turn off support for 'wait=true' for the analyze and upload methods. We will be turning off this feature in July 2012. If you rely on 'wait=true' behavior you should refactor your code now to use 'wait=false' and check the status returned from track/profile.


Posts: 12
Registered: Jan 17, 2012

Ok, but i didn't really understand, what is sure that the server reply with wait=false ?

I guess the id and the md5 of the request, right ? I should not expect to get back also the title of the song and the name of the artist, right ?

PS: 3 days by the way is not so much time...

Posts: 1098
Registered: Sep 08, 2008

Hi siscia - you will get back at least the ID. You can then make track/profile calls to get the rest of the data. As for the sunset date, we are looking at Jul 27 so that should give you plenty of time. -- Paul

Posts: 12
Registered: Jan 17, 2012

Ok, now it is more clear...

Do we know in how much time the server is suppose to analyze the track ?

Posts: 185
Registered: Feb 22, 2011


The time to analyze depends on system load as well as track duration so it is difficult to predict. The vast majority of tracks are complete within 5-10 seconds of upload time (another client-side variable). Supporting only asynchronous uploads (wait=false) will allow us to put all available compute resources on that one code path.

Thanks. David

Posts: 22
Registered: Jan 19, 2012

Hi everyone, just following up on this. As of today, 'wait=true' has been deprecated and all track/upload and track/analyze calls are now asynchronous. You can use the track/profile call to check the status of the analysis via the 'status' field returned in the track/profile response. Please let us know if you have any questions.

Thanks. Scott

Posts: 15
Registered: Jul 20, 2011

We have pushed a new version of pyechonest that only makes async calls to track/upload and track/analyze. Enjoy!

Reply to this Thread

You must log in to post a reply.