diff options
Diffstat (limited to 'plugins/jobs/brokers/amqp/rabbit_init.go')
-rw-r--r-- | plugins/jobs/brokers/amqp/rabbit_init.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/jobs/brokers/amqp/rabbit_init.go b/plugins/jobs/brokers/amqp/rabbit_init.go index cb9f2dc4..e3e5f8da 100644 --- a/plugins/jobs/brokers/amqp/rabbit_init.go +++ b/plugins/jobs/brokers/amqp/rabbit_init.go @@ -1,11 +1,14 @@ package amqp import ( + "time" + "github.com/spiral/errors" + "github.com/spiral/roadrunner/v2/pkg/events" ) func (j *JobsConsumer) initRabbitMQ() error { - const op = errors.Op("rabbit_initmq") + const op = errors.Op("jobs_plugin_rmq_init") // Channel opens a unique, concurrent server channel to process the bulk of AMQP // messages. Any error from methods on this receiver will render the receiver // invalid and a new Channel should be opened. @@ -53,5 +56,10 @@ func (j *JobsConsumer) initRabbitMQ() error { return errors.E(op, err) } + j.eh.Push(events.JobEvent{ + Event: events.EventInitialized, + Driver: "amqp", + Start: time.Now(), + }) return channel.Close() } |