Golang client library for calling Celery tasks - http://www.celeryproject.org
It currently support AMQP brokers and depends on http://github.com/streadway/amqp
Installation: go get github.com/bsphere/celery
Use http://github.com/streadway/amqp and open a connection and get a channel.
import (
"github.com/bsphere/celery""github.com/streadway/amqp"funcmain() {
conn, err :=amqp.Dial("amqp://guest@localhost://")
iferr!=nil {
panic(err)
}
deferconn.Close()
ch, err:=conn.Channel()
iferr!=nil {
panic(err)
}
task, err:=celery.NewTask("tasks.test", []string{}, nil)
iferr!=nil {
panic(err)
}
err=task.Publish(ch, "", "celery")
}