Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.
/ sqjobs Public archive

Simple Queue Jobs (using SQS, Simple Queue Service, from AWS)

License

Notifications You must be signed in to change notification settings

igalarzab/sqjobs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9ae5db2 · Aug 29, 2017
Aug 29, 2017
Nov 17, 2016
Apr 15, 2016
Jan 26, 2016
Aug 29, 2017
Jan 26, 2016
Apr 10, 2016
Apr 11, 2016
Nov 17, 2016
Jan 3, 2016
Apr 15, 2016
Aug 29, 2017
Feb 25, 2015
Apr 15, 2016

Repository files navigation

sqjobs

CircleCIBadge

Installation

Simply use pip to install the last version of sqjobs

$ pip install --upgrade sqjobs

Getting started

First you have to create jobs. A job is simply a class that inherits from Job.

from sqjobs import Job

class Adder(Job):
    default_queue_name = 'queue_name'

    def run(self, num1, num2):
        return num1 + num2

Then, you can launch the job creating a new broker.

from sqjobs import create_sqs_broker

broker = create_sqs_broker(access_key='ak', secret_key='sk')
broker.add_job(AdderJob, 1, 2, queue_name='other_queue_name')

Documentation

Check out sqjobs’s documentation for further information.