I am using the following code to upload files to GCS.
blob = bucket.blob(gcs_filepath)
logging.info('Uploading file "%s" to "%s".', filepath, gcs_filepath)
blob.upload_from_filename(filepath)
logging.info('Uploaded file "%s" to "%s".', filepath, gcs_filepath)
This works most of the time. However, it has been stuck uploading for the last hour and has not raised an exception yet. It seems like this method should have a timeout or something for situations like this. It would also be helpful if it had the option to log the progress of the method for further diagnosis.