'Push the file pointed to by ``rel_path`` to the object store naming the key
``rel_path``. If ``source_file`` is provided, push that file instead while
still using ``rel_path`` as the key name.
If ``from_string`` is provided, set contents of the file to the value of
the string.'

def _push_to_os(self, rel_path, source_file=None, from_string=None):

    try:
        source_file = (source_file if source_file else self._get_cache_path(rel_path))
        if os.path.exists(source_file):
            key = Key(self.bucket, rel_path)
            if ((os.path.getsize(source_file) == 0) and key.exists()):
                log.debug("Wanted    to    push    file    '%s'    to    S3    key    '%s'    but    its    size    is    0;    skipping.", source_file, rel_path)
                return True
            if from_string:
                key.set_contents_from_string(from_string, reduced_redundancy=self.use_rr)
                log.debug("Pushed    data    from    string    '%s'    to    key    '%s'", from_string, rel_path)
            else:
                start_time = datetime.now()
                log.debug("Pushing    cache    file    '%s'    of    size    %s    bytes    to    key    '%s'", source_file, os.path.getsize(source_file), rel_path)
                mb_size = (os.path.getsize(source_file) / 1000000.0)
                if ((mb_size < 10) or (not self.multipart)):
                    self.transfer_progress = 0
                    key.set_contents_from_filename(source_file, reduced_redundancy=self.use_rr, cb=self._transfer_cb, num_cb=10)
                else:
                    multipart_upload(self.s3server, self.bucket, key.name, source_file, mb_size)
                end_time = datetime.now()
                log.debug("Pushed    cache    file    '%s'    to    key    '%s'    (%s    bytes    transfered    in    %s    sec)", source_file, rel_path, os.path.getsize(source_file), (end_time - start_time))
            return True
        else:
            log.error("Tried    updating    key    '%s'    from    source    file    '%s',    but    source    file    does    not    exist.", rel_path, source_file)
    except S3ResponseError:
        log.exception("Trouble    pushing    S3    key    '%s'    from    file    '%s'", rel_path, source_file)
    return False
