asynq

package
v0.0.0-...-dc1609e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

README

Asynq CLI

Asynq CLI is a command line tool to monitor the queues and tasks managed by asynq package.

Table of Contents

Installation

In order to use the tool, compile it using the following command:

go install github.com/hibiken/asynq/tools/asynq

This will create the asynq executable under your $GOPATH/bin directory.

Usage

Commands

To view details on any command, use asynq help <command> <subcommand>.

  • asynq dash
  • asynq stats
  • asynq queue [ls inspect history rm pause unpause]
  • asynq task [ls cancel delete archive run delete-all archive-all run-all]
  • asynq server [ls]
Global flags

Asynq CLI needs to connect to a redis-server to inspect the state of queues and tasks. Use flags to specify the options to connect to the redis-server used by your application. To connect to a redis cluster, pass --cluster and --cluster_addrs flags.

By default, CLI will try to connect to a redis server running at localhost:6379.

      --config string          config file to set flag defaut values (default is $HOME/.asynq.yaml)
  -n, --db int                 redis database number (default is 0)
  -h, --help                   help for asynq
  -p, --password string        password to use when connecting to redis server
  -u, --uri string             redis server URI (default "127.0.0.1:6379")

      --cluster                connect to redis cluster
      --cluster_addrs string   list of comma-separated redis server addresses

Config File

You can use a config file to set default values for the flags.

By default, asynq will try to read config file located in $HOME/.asynq.(yml|json). You can specify the file location via --config flag.

Config file example:

uri: 127.0.0.1:6379
db: 2
password: mypassword

This will set the default values for --uri, --db, and --password flags.

Documentation

Overview

Package asynq fork from github.com/hibiken/asynq@6a7bf2ceff1e920b3e8542635b273c4dcca192ac, which is released at Sep 8, 2023 after v0.24.1 at May 1, 2023

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command() *cobra.Command

Types

type AggregateStats

type AggregateStats struct {
	Active      int       `json:"active"`
	Pending     int       `json:"pending"`
	Aggregating int       `json:"aggregating"`
	Scheduled   int       `json:"scheduled"`
	Retry       int       `json:"retry"`
	Archived    int       `json:"archived"`
	Completed   int       `json:"completed"`
	Processed   int       `json:"processed"`
	Failed      int       `json:"failed"`
	Timestamp   time.Time `json:"timestamp"`
}

type FullStats

type FullStats struct {
	Aggregate  AggregateStats    `json:"aggregate"`
	QueueStats []*rdb.Stats      `json:"queues"`
	RedisInfo  map[string]string `json:"redis"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL