mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
refactor: Remove unused code and update models and functions for notification channels and settings
This commit is contained in:
@@ -15,7 +15,6 @@ import (
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
type ServiceV2 struct {
|
||||
@@ -51,7 +50,6 @@ func (svc *ServiceV2) scheduleTasks(s *models2.SpiderV2, opts *interfaces.Spider
|
||||
ScheduleId: opts.ScheduleId,
|
||||
Priority: opts.Priority,
|
||||
UserId: opts.UserId,
|
||||
CreateTs: time.Now(),
|
||||
}
|
||||
mainTask.SetId(primitive.NewObjectID())
|
||||
|
||||
@@ -88,7 +86,6 @@ func (svc *ServiceV2) scheduleTasks(s *models2.SpiderV2, opts *interfaces.Spider
|
||||
ScheduleId: opts.ScheduleId,
|
||||
Priority: opts.Priority,
|
||||
UserId: opts.UserId,
|
||||
CreateTs: time.Now(),
|
||||
}
|
||||
t.SetId(primitive.NewObjectID())
|
||||
t2, err := svc.schedulerSvc.Enqueue(t, opts.UserId)
|
||||
|
||||
Reference in New Issue
Block a user