Пример #1
0
class TaskResult(db.Model):
    """The results of a Task, including logs and execution time."""
    exit_code = db.IntegerProperty(required=True)
    execution_time = db.FloatProperty(required=False)
    stdout = blobstore.BlobReferenceProperty(required=False)
    stderr = blobstore.BlobReferenceProperty(required=False)
    stdout_download_url = db.TextProperty(required=False)
    stderr_download_url = db.TextProperty(required=True)
    # Should be populated if task execution involved a device.
    device_serial_number = db.StringProperty(required=False)
    result_metadata = db.TextProperty(required=False)
    worker_log = db.TextProperty(required=False)
Пример #2
0
class PackageFile(db.Model):
    """A reference to a file in blobstore along with manifest information.

  Could also be a reference to a file somewhere on the web, in which case
  there will be no blobstore info."""

    # Must set either blob or url, but not both or neither.
    blob = blobstore.BlobReferenceProperty(required=False)

    # Must include relative file path and file name of destination.
    destination = db.TextProperty(required=True)
    # Mode of file.  755 for an executable, for instance.
    file_mode = db.TextProperty(required=True)
    download_url = db.TextProperty(required=True)
Пример #3
0
class Badges(db.Model):
    name = db.StringProperty(required=True)
    description = db.TextProperty(required=True)
    altText = db.StringProperty(required=True)
    setType = db.StringProperty(required=True, choices=set(TYPES))
    isEnabled = db.StringProperty(required=True, choices=set(BOOLEAN))
    creationDate = db.DateTimeProperty(auto_now_add=True)
    modifiedDate = db.DateTimeProperty(auto_now=True)
    creator = db.ReferenceProperty(reference_class=Accounts, required=True)
    tags = db.StringProperty()
    permissions = db.StringProperty(required=True, choices=set(PERMISSION))
    storageType = db.StringProperty(required=True, choices=set(STYPE))
    # This if you want to make the badge clickable, and route to a resource
    # or secret link, etc
    resourceLink = db.LinkProperty()
    downloadLink = db.LinkProperty()
    # a reference key to the object stored into the blobstore
    blobKey = blobstore.BlobReferenceProperty()
    imageKey = db.ReferenceProperty(reference_class=BadgeImage)
    # Uploaded files in static images of badges
    filePath = db.StringProperty()
    theme = db.StringProperty()
Пример #4
0
class NTriplesFileModel(db.Model):
    fname = db.StringProperty()
    ntriplefile = blobstore.BlobReferenceProperty()
    date = db.DateTimeProperty(auto_now_add=True)