Skip to main content

Guillotina addon to split actions into smaller bits

Project description

guillotina_hive is a task runner whose main goal is to provide a mechanism to iterate through all the content on a database as quickly as possible.

To accomplish that end, hive integrates with container orchestrators(k8s or nomad) to schedule jobs on and retrieve results from those jobs.

Installation

With pip:

pip install guillotina_hive

Guillotina configuration

Example here with json:

"applications": ["guillotina_hive"],
"hive": {
    "default_image": None,
    "default_namespace": "hive",
    "orchestrator": "k8s",
    "cluster_config": {},
    "guillotina_default": {
        "entrypoint": None,
        "volumes": None,
        "volumeMounts": None,
        "envFrom": None
    },
    'quota': None
}

Settings explained

  • default_image: default image to use for jobs to run with

  • default_namespace: cluster namespace to use

  • orchestrator: k8s or nomad

  • cluster_config: what to configure aioclustermanager with

  • guillotina_default: default configuration for guillotina jobs

  • quota: define quote on cluster namespace

Defining a job

We use decorators to provide tasks:

from guillotina_hive.decorators import hive_task
@hive_task(name='something')
async def something(arg1, arg2):
    return foobar

You can also use application settings:

{
    "calculate-numbers": "guillotina_hive.tests.tasks.calculate_numbers"
}

1.0.10 (2018-04-26)

  • Remove print [vangheem]

1.0.9 (2018-04-26)

  • apply builtin tasks setup request object url as well [vangheem]

1.0.7 (2018-04-25)

  • improve user login for apply tasks [vangheem]

1.0.4 (2018-04-24)

  • Fix working with decorators [vangheem]

1.0.3 (2018-04-24)

  • fix to work with guillotina 3 [vangheem]

1.0.1 (9/4/2018)

  • Adding manifest [ramon]

1.0.0 (5/4/2018)

  • 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

guillotina_hive-1.0.10.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

guillotina_hive-1.0.10-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file guillotina_hive-1.0.10.tar.gz.

File metadata

File hashes

Hashes for guillotina_hive-1.0.10.tar.gz
Algorithm Hash digest
SHA256 b4ff9d581e7a5a4646200b0ba9ea1854c8546458b3df83263b7ef20bb087721a
MD5 2f65b7124c96575ebc6e87f0f43b410f
BLAKE2b-256 483adb4c1cc3f3f9c05df726173bfa60b5a432ab833fa5681b48552b3393bbfc

See more details on using hashes here.

File details

Details for the file guillotina_hive-1.0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for guillotina_hive-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 c4d9d8233a540ef1c83f911294288f58a5c126bdf31a9caa501a6e0897a1a86d
MD5 5252086d7a989627275ca48dbfa929ed
BLAKE2b-256 8fe964066576c27da7af0b99b5248edf80264b2a48ea9ab82735b585ccecf147

See more details on using hashes here.

Supported by

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