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.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.3.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

guillotina_hive-1.0.3-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for guillotina_hive-1.0.3.tar.gz
Algorithm Hash digest
SHA256 620b0f5160593e17daf3d1e3ebb73d99f726d8b0b214f7b3a109b10c8b20b5e6
MD5 ea7a55e62588cfb93e64b0b5d6bb6451
BLAKE2b-256 ef63238e5c945d4baa5ee34018748a30c1985dc1379fb3d23d0d755388ce5dfc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for guillotina_hive-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 570587f60984fe380f774f63b982f39d18b8124d2eb3ea4a21feb100b114f09d
MD5 8caf9ee6e39d51c3fa1461de0ca90605
BLAKE2b-256 65b5c98f9fb7df8e70811d4538616367aad5cce93d530ea15bae34c7f4659413

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