Example #1
0
    def get(self, filename):

        export = ExportTask.query(UserImage.filename == filename).get()

        if not export:
            self.error(404)
        else:
            self.send_blob(filestore.get_blob_key(export.filename))
Example #2
0
    def get(self, filename):

    	export = ExportTask.query(UserImage.filename == filename).get()
    	

        if not export:
            self.error(404)
        else:
			self.send_blob(filestore.get_blob_key(export.filename))
Example #3
0
	def cleanup_old_export_tasks(self):
		#Lets delete any old export tasks hanging around...
		old_deleted = 0
		for ex in ExportTask.query().fetch():
			if ex.status in ('finished', 'failed'):
				try:
					filestore.delete(ex.filename)
				except:
					pass
				ex.key.delete()
				old_deleted += 1

		if old_deleted > 0:
			logging.info('Deleted %s old export tasks' % old_deleted)
Example #4
0
    def cleanup_old_export_tasks(self):
        #Lets delete any old export tasks hanging around...
        old_deleted = 0
        for ex in ExportTask.query().fetch():
            if ex.status in ('finished', 'failed'):
                try:
                    filestore.delete(ex.filename)
                except:
                    pass
                ex.key.delete()
                old_deleted += 1

        if old_deleted > 0:
            logging.info('Deleted %s old export tasks' % old_deleted)