jobs

package
v0.11.19 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteOrphanedObjects

func DeleteOrphanedObjects(
	ctx context.Context,
	apiManipulator manipulate.Manipulator,
	m manipulate.TransactionalManipulator,
	identities []elemental.Identity,
) error

DeleteOrphanedObjects deletes the objects with the given identities that are not in any of the given namespaces.

func ScheduleOrphanedObjectsDeleteJob

func ScheduleOrphanedObjectsDeleteJob(
	ctx context.Context,
	nsm manipulate.Manipulator,
	m manipulate.TransactionalManipulator,
	identities []elemental.Identity,
	period time.Duration,
)

ScheduleOrphanedObjectsDeleteJob periodically cleans objects that lives in a deleted namespace. It takes 2 manipulators. The first one is used to perform object cleanup in the database. The other is used to retrieve the list of existing namespaces. The job will remove all the identities provided by the given model manager that have a package set to the given packageName. If package name is set to *, the job will apply to all identities The job will run at the defined period + a random duration between 0 and 1 minute.

Types

This section is empty.

Jump to

Keyboard shortcuts

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