triggers

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Scheduler *gocron.Scheduler

Scheduler manages all cron-based agent jobs.

Functions

func InitAsynqClient

func InitAsynqClient(client *asynq.Client)

InitAsynqClient initializes the triggers package with a shared Asynq client. This function must be called once when your server starts, as you've done in `cmd/start.go`.

func StartJob

func StartJob(agentID uint)

StartJob enqueues a run of the agent on the worker queue. It is called by the cron scheduler at each tick of the agent's schedule.

func StartScheduler

func StartScheduler()

StartScheduler initializes the gocron scheduler and adds jobs for all agents with a cron field.

func TriggerSchemaReload

func TriggerSchemaReload()

TriggerSchemaReload re-initializes the GraphQL schema. It's designed to be called in a goroutine so it doesn't block API responses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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