tasks

package
v1.38.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CaptureAsync = delay.Func("capture-async", func(ctx context.Context, orgId string, ordId string) {
	db := datastore.New(ctx)
	org := organization.New(db)
	org.MustGetById(orgId)

	nsdb := datastore.New(org.Namespaced(ctx))
	ord := order.New(nsdb)
	usr := user.New(nsdb)

	ord.MustGetById(ordId)
	usr.MustGetById(ord.UserId)

	if !ord.Test || usr.Test {
		util.UpdateMailchimp(ctx, org, ord, usr)
	}

})
View Source
var SendOrderConfirmation = delay.Func("send-order-confirmation", func(ctx context.Context, orgId, ordId, emailAddress, firstName, lastName string) {
	db := datastore.New(ctx)
	org := organization.New(db)
	org.MustGetById(orgId)

	nsdb := datastore.New(org.Namespaced(ctx))
	ord := order.New(nsdb)
	ord.MustGetById(ordId)

	usr := new(user.User)
	usr.Email = emailAddress
	usr.FirstName = firstName
	usr.LastName = lastName
	usr.Init(ord.Datastore())

	email.SendOrderConfirmation(ctx, org, ord, usr)
})

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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