celery

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Exchange names as defined in common/celery/routing.py
	UpdateSpaceExchange  = "update_space"
	DeleteSpaceExchange  = "delete_space"
	DeleteDeviceExchange = "delete_device"

	// Task names for message identification
	UpdateSpaceTaskName  = "spacedf.tasks.update_space"
	DeleteSpaceTaskName  = "spacedf.tasks.delete_space"
	DeleteDeviceTaskName = "spacedf.tasks.delete_device"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SchemaInitializer added in v0.0.3

type SchemaInitializer interface {
	CreateSchemaAndTables(ctx context.Context, orgSlug string) error
}

SchemaInitializer handles database schema initialization

type TaskConsumer

type TaskConsumer struct {
	// contains filtered or unexported fields
}

TaskConsumer consumes Celery tasks from RabbitMQ

func NewTaskConsumer

func NewTaskConsumer(amqpURL string, dbClient *timescaledb.Client, logger *zap.Logger) *TaskConsumer

NewTaskConsumer creates a new Celery task consumer

func (*TaskConsumer) Connect

func (c *TaskConsumer) Connect() error

Connect establishes connection to RabbitMQ for Celery tasks

func (*TaskConsumer) IsHealthy

func (c *TaskConsumer) IsHealthy() bool

IsHealthy checks if the consumer is healthy

func (*TaskConsumer) Start

func (c *TaskConsumer) Start(ctx context.Context) error

Start begins consuming Celery tasks from both queues

func (*TaskConsumer) Stop

func (c *TaskConsumer) Stop() error

Stop gracefully stops the consumer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL