lib.cuckoo.core.database.Task

Package lib :: Package cuckoo :: Package core :: Module database :: Class Task |
[hide private]
[frames] | no frames]

# Class Task

source code

    declarative_base() --+
                         |
                        Task

Analysis task queue.

Instance Methods | [hide private]
duration(self) | source code
options(self, value) | source code
to_dict(self) Converts object to dict. | source code
to_json(self) Converts object to JSON. | source code
__init__(self, target=None) | source code
__repr__(self) | source code

Class Variables | [hide private]
| __tablename__ = `"tasks"`
| id = `Column(Integer(), primary_key= True)`
| target = `Column(Text(), nullable= False)`
| category = `Column(String(255), nullable= False)`
| timeout = `Column(Integer(), server_default= "0", nullable= False)`
| priority = `Column(Integer(), server_default= "1", nullable= Fa`...``
| custom = `Column(String(255), nullable= True)`
| owner = `Column(String(64), nullable= True)`
| machine = `Column(String(255), nullable= True)`
| package = `Column(String(255), nullable= True)`
| tags = `relationship("Tag", secondary= tasks_tags, single_paren`...``
| _options = `Column("options", String(255), nullable= True)`
| platform = `Column(String(255), nullable= True)`
| memory = `Column(Boolean, nullable= False, default= False)`
| enforce_timeout = `Column(Boolean, nullable= False, default= Fa`...``
| clock = `Column(DateTime(timezone= False), default= datetime.no`...``
| added_on = `Column(DateTime(timezone= False), default= datetime`...``
| started_on = `Column(DateTime(timezone= False), nullable= True)`
| completed_on = `Column(DateTime(timezone= False), nullable= True)`
| status = `Column(Enum(TASK_PENDING, TASK_RUNNING, TASK_COMPLETE`...``
| sample_id = `Column(Integer, ForeignKey("samples.id"), nullable`...``
| processing = `Column(String(16), nullable= True)`
| route = `Column(String(16), nullable= True)`
| sample = `relationship("Sample", backref= "tasks")`
| guest = `relationship("Guest", uselist= False, backref= "tasks"`...``
| errors = `relationship("Error", backref= "tasks", cascade= "sav`...``

Method Details | [hide private]

### options(self, value) | source code
Decorators: `@options.setter`

### to_dict(self) | source code
Converts object to dict. Returns: dict

### to_json(self) | source code
Converts object to JSON. Returns: JSON data

Class Variable Details | [hide private]

  ### priority Value:
      Column(Integer(), server_default= "1", nullable= False)

  ### tags Value:
      relationship("Tag", secondary= tasks_tags, single_parent= True, backre
      f= "task", lazy= "subquery")

  ### enforce_timeout Value:
      Column(Boolean, nullable= False, default= False)

  ### clock Value:
      Column(DateTime(timezone= False), default= datetime.now, nullable= Fal
      se)

  ### added_on Value:
      Column(DateTime(timezone= False), default= datetime.now, nullable= Fal
      se)

  ### status Value:
      Column(Enum(TASK_PENDING, TASK_RUNNING, TASK_COMPLETED, TASK_REPORTED,
       TASK_RECOVERED, TASK_FAILED_ANALYSIS, TASK_FAILED_PROCESSING, TASK_FA
      ILED_REPORTING, name= "status_type"), server_default= TASK_PENDING, nu
      llable= False)

  ### sample_id Value:
      Column(Integer, ForeignKey("samples.id"), nullable= True)

  ### guest Value:
      relationship("Guest", uselist= False, backref= "tasks", cascade= "save
      -update, delete")

  ### errors Value:
      relationship("Error", backref= "tasks", cascade= "save-update, delete"
      )