Follow [Twitter's guidance](https://dev.twitter.com/rest/reference/post/media/upload-finalize) for media uploads: "If and (only if) the response of the FINALIZE command contains a processing_info field, it may also be necessary to use a STATUS command and wait for it to return success before proceeding to Tweet creation."
pull/9121/merge
Mike Christianson 2017-09-11 21:37:36 -07:00 committed by Paulus Schoutsen
parent 51ff6009a3
commit 10c0744c4a
1 changed files with 3 additions and 0 deletions

View File

@ -116,6 +116,9 @@ class TwitterNotificationService(BaseNotificationService):
self.log_error_resp(resp)
return None
if resp.json().get('processing_info') is None:
return callback(media_id)
self.check_status_until_done(media_id, callback)
def media_info(self, media_path):