Skip to content

Commit

Permalink
adding timeout param to the db model
Browse files Browse the repository at this point in the history
  • Loading branch information
ooemperor committed Jun 23, 2024
1 parent 157d1e6 commit 8891c5e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions codeGrader/backend/db/Task.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ class Task(Base):
String, nullable=True
)

# timeout param for the execution
timeout = Column(
Integer, nullable=True, default=60
)

# Foreign Keys
exercise_id = Column(
Integer,
Expand Down Expand Up @@ -154,6 +159,7 @@ def toJson(self, recursive: bool = True) -> dict:
out["id"] = self.id
out["name"] = self.name
out["tag"] = self.tag
out["timeout"] = self.timeout

if self.description is not None:
out["description"] = self.description
Expand Down

0 comments on commit 8891c5e

Please sign in to comment.