Skip to content

Honeybee-Health/activejob

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An extremely simple interface for ActiveJob.

Currently this package support Shoryuken. Sidekiq is not implemented yet, PRs welcome.

Install

go get -u github.com/Honeybee-Health/activejob

Usage

package main

import (
    "github.com/Honeybee-Health/activejob"
)

func main() {
    job := &activejob.Job{
        QueueName: "my_worker_queue",
        JobClass:  "MyHandlerJob",
        Arguments: []interface{}{
            map[string]interface{}{
                "some": "body data",
                "number": 1
            }
        },
    }

    awsConfig := &aws.Config{Region: aws.String("us-west-2")}
    jobClient := activejob.NewShoryukenWorker(awsConfig)
    jobID, err := jobClient.Enqueue(job)
    if err != nil {
        return err
    }
}

About

Simple Golang interface for Rails ActiveJob

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages