mirror of
https://github.com/SamyRai/tercul-backend.git
synced 2025-12-27 05:11:34 +00:00
35 lines
623 B
Go
35 lines
623 B
Go
package syncjob
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Task types constants
|
|
const (
|
|
TaskFullSync = "sync:full"
|
|
TaskEntitySync = "sync:entity"
|
|
TaskEdgeSync = "sync:edge"
|
|
)
|
|
|
|
// Default configuration values
|
|
const (
|
|
DefaultBatchSize = 100
|
|
DefaultEntityDelay = 5 * time.Second
|
|
DefaultEdgeDelay = 5 * time.Second
|
|
DefaultFullSyncDelay = 10 * time.Second
|
|
)
|
|
|
|
// Payload types for different sync tasks
|
|
type SyncPayload struct {
|
|
Full bool `json:"full"`
|
|
}
|
|
|
|
type EntitySyncPayload struct {
|
|
ClassName string `json:"class_name"`
|
|
}
|
|
|
|
type EdgeSyncPayload struct {
|
|
BatchSize int `json:"batch_size"`
|
|
Offset int `json:"offset"`
|
|
}
|