Skip to main content

Cube for starting RqJobs on a Rq worker

Installation

Open the project in a terminal and run:

pip install -e .

This will install the cube in your active virtual environment as cubicweb-rq.

The following sections indicate additional steps when you install this cube as a dependency or as an instance.

As a dependency

If you plan to use this cube as a dependency for your own cube, add it to your __pkginfo__.py as follows:

__depends__ = {
    # ... Your previous dependencies
    "cubicweb-rq": None,
}

If the target cube is already used as an instance, you need to migrate it with the help of its python shell (replace YOUR_INSTANCE_NAME by your instance name):

cubicweb-ctl shell YOUR_INSTANCE_NAME

In the python prompt, enter the following command:

add_cube("rq")

Press Ctrl-D then restart your instance. The cube should now be available in your instance.

As an instance

If you plan to use this cube directly as an instance, create and start your instance with the following commands (replace cubicweb-instance by the name of your choice):

cubicweb-ctl create rq cubicweb-instance
cubicweb-ctl start -D cubicweb-instance

Learn More

Visit the official documentation to learn more about CubicWeb.

Launch a worker

Have redis installed and running on your machine.

$ sudo apt-get install redis-server
$ sudo system-ctl start redis

In your ~/etc/cubicweb.d/cubicweb-instance/pyramid.ini file, add the following lines

redis.sessions.timeout = 1200
redis.sessions.secret = stuff
redis.sessions.prefix = cubicweb-instance:
redis.sessions.url = redis://localhost:6379/0
rq.redis_url = redis://localhost:6379/0

Launch a worker with the following command line (replace cubicweb-instance with the name of your cubicweb instance):

cubicweb-ctl rq-worker cubicweb-instance

Release files for cubicweb-rq 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cubicweb-rq 0.1.1
File Size Uploaded
cubicweb-rq-0.1.1.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cubicweb-rq 0.1.1
File Interpreter ABI Platform
cubicweb_rq-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 22.7 kB

Release files / cubicweb-rq-0.1.1.tar.gz

Download URL cubicweb-rq-0.1.1.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
89395a01916bf7129c5650ba421181e0351f8a954ebf7af6c24f04795633a72e
BLAKE2b-256 checksum
How to use checksums
861cf5fe2032c760ac903b4f5b575bdf37cd762a7d6feb9620d61637341927ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.8

Release files / cubicweb_rq-0.1.1-py3-none-any.whl

Download URL cubicweb_rq-0.1.1-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56f9fcaa90fe3df87ceff7c810927bb0caa8575e969979ded0cb0044661bbeaf
BLAKE2b-256 checksum
How to use checksums
2a3643177a299133b471fa2334bd5bbb1b75a61eb53da3b3f32ad7c9c742985c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.8

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page