Skip to main content

A simple commandline app that implements a task queue

Project description

TaskQ

Simple CLI for multi user queue execution in Linux. TaskQ allows a single computer to be used by different users concurrently. TaskQ allows each user to submit a task to the same queue, which will be handled by the Task Handler Bot.

1. Setup

1.1. Installing Screen

The Linux program Screen is a TaskQ's dependecy. In order to install it on Ubuntu, run the commands:

sudo apt-get update
sudo apt-get install screen

1.2. Installing TaskQ

TaskQ needs to be installed in order to set its dependecies correctly. In order to do that, it needs a folder to be the TaskQ home, where the app will save its local files, and also an UID to define the owner of TaskQ's queue. It is important to note that the TaskQ Bot will run with the privileges of user that executed the installation step below.

pip install task-q
sudo taskq install $HOME $(id -u $USER)

1.3. Starting Task Handler

The Task Handler is the bot that will execute the tasks in the TaskQ queue. It is necessary to start it manually. It is important to note that only the TaskQ queue owner has the priviliges to start or to stop the Task Handler.

taskq start

In order to stop the queue, do:

taskq stop

2. Using the TaskQ

2.1. Show the queue

To show the queue waiting list, run the command below:

taskq show-queue

It is possible to filter the table with the options below:

  • all: shows all the tasks in the queue, including the completed and failed ones.
  • running: shows only the tasks that are running at the moment
  • mine: shows only the tasks that belong to the user
  • done: shows only the tasks that are complete

2.2. Add a task to the queue

A task for TaskQ is basically a bash command that will be executed within the queue owner context. To add a task to the queue, do:

taskq add '<command string>'

2.3. Abort a task

Aborting a task will remove it out of the waiting list:

taskq abort <task id>

2.4. Reset a task

Reseting a task will put it back into the waiting list:

taskq reset <task id>

For more information, excecute taskq --help.

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

task-q-1.1.4.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

task_q-1.1.4-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file task-q-1.1.4.tar.gz.

File metadata

  • Download URL: task-q-1.1.4.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for task-q-1.1.4.tar.gz
Algorithm Hash digest
SHA256 393babb129c86ab23505c1adceed92507a2b8fa158e91d9528d21847bb27918d
MD5 fb74fd7518428bb1db095d8ede38f0b3
BLAKE2b-256 7d4823aeb4541cfbe82e3de512c3ff139cc4b5232e947c6f6c814304621ecbaf

See more details on using hashes here.

File details

Details for the file task_q-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: task_q-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for task_q-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 630ef9e06fbf96c330537a0e9052c9839b017288a27f0086aa402c112ba50b2e
MD5 020bb8bc84d1237d0aedd2b71d0d84c4
BLAKE2b-256 5c5d2c51ed91d03ec87fdc84c7b924734f4d5d5032fd3aacc0c27eeac064359b

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