Skip to main content

Rocket task manager

Project description

PypiDownloads pythonversions

Rocket task manager

Server task manager in python

Install

pip install rockettm

Link pypi: https://pypi.python.org/pypi/rockettm

Example

Send task

# send task
from rockettm import send_task

send_task("queue_name", "name_task", "arg1", ["arg2", "2"], {'args': 3}, ('arg', 4))

Declare new task

Warning! if there are 2 tasks registered with the same name, will run 2!

# task example
from rockettm import task


@task('name_task')
def function1(*args, **kwargs):
    return True

settings.py example

# settings.py example
ip = "localhost"
port = 5672
imports = ['examples.test1',
           'examples.test2']

queues = [{'name': 'rocket1', 'concurrency': 7},
          {'name': 'rocket2', 'concurrency': 1}]

Run server

rabbitmq_server file_settings.py

Documentation

Functions

  • task(name_task_event) It is a decorator to create tasks

  • send_task(queue, name_task, *args) Send task

  • add_task(name_task, func(object)) Add manual task

CHANGELOG

0.0.2 (2016-03-14)

  • Add documentation

0.0.1 (2016-03-14)

  • initial version

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rockettm-0.0.2.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file rockettm-0.0.2.tar.gz.

File metadata

  • Download URL: rockettm-0.0.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rockettm-0.0.2.tar.gz
Algorithm Hash digest
SHA256 1a6a6f389df8138a48d39aa4392d0875a44d8e305d6f825125d1ca815191c0cf
MD5 4b71d486b2bd36d61af8eb975386f693
BLAKE2b-256 e055fdc4fa63a079139b4680228bb42a19e13a92d03838d8d0af1f15c3690c3b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page