mirror of
https://github.com/SamyRai/tercul-backend.git
synced 2025-12-27 05:11:34 +00:00
- Core Go application with GraphQL API using gqlgen - Comprehensive data models for literary works, authors, translations - Repository pattern with caching layer - Authentication and authorization system - Linguistics analysis capabilities with multiple adapters - Vector search integration with Weaviate - Docker containerization support - Python data migration and analysis scripts - Clean architecture with proper separation of concerns - Production-ready configuration and middleware - Proper .gitignore excluding vendor/, database files, and build artifacts
41 lines
629 B
Go
41 lines
629 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"`
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|