def file_update_check(self, metadata, db_metadata):
        # Get the timestamps
        onitu_ts = metadata.extra.get('modified', None)
        if onitu_ts:
            onitu_ts = time.strptime(onitu_ts,
                                     TIMESTAMP_FMT)
            dropbox_ts = time.strptime(db_metadata['modified'],
                                       TIMESTAMP_FMT)
        # If it's a new file or Dropbox timestamp is more recent
        if not onitu_ts or dropbox_ts > onitu_ts:
            # write=False because metadata.write() will be performed
            # anyway in plug.update_file
            update_metadata_info(metadata, db_metadata, write=False)
            plug.update_file(metadata)
            plug.logger.debug(u"Updating metadata of '{}'"
                              .format(metadata.filename))
        else:
            plug.logger.debug(u"Onitu file '{}' is up-to-date"
                              .format(metadata.filename))
Update a resource.
dataset/ETHPy150Open onitu/onitu/drivers/dropbox/onitu_dropbox/dropbox_driver.py/CheckChanges.file_update_check--crossover with--dataset/ETHPy150Open openstack-infra/python-storyboardclient/storyboardclient/base.py/BaseManager.update