feat(practice): queue practice runs with one running and ten waiting
This commit is contained in:
1 parent
51770eea6c
commit
754c745fba
40 files changed
+3040
-70
No files matched your search
@@ -172,6 +172,7 @@ INSERT INTO assessment_practice_jobs (
|
||||
submission_id,
|
||||
mode,
|
||||
state,
|
||||
available_at,
|
||||
created_at,
|
||||
updated_at
|
||||
) VALUES (
|
||||
@@ -179,6 +180,7 @@ INSERT INTO assessment_practice_jobs (
|
||||
$2,
|
||||
'queued',
|
||||
$3,
|
||||
$3,
|
||||
$3
|
||||
)
|
||||
`
|
||||
@@ -190,7 +192,7 @@ type InsertAssessmentPracticeJobParams struct {
|
||||
}
|
||||
|
||||
// Queues the execution job of a submission in the transaction that stores
|
||||
// the submission.
|
||||
// the submission. The job is available at once.
|
||||
func (q *Queries) InsertAssessmentPracticeJob(ctx context.Context, arg InsertAssessmentPracticeJobParams) error {
|
||||
_, err := q.db.Exec(ctx, insertAssessmentPracticeJob, arg.SubmissionID, arg.Mode, arg.CreatedAt)
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user