https://github.com/link89/webq
https://github.com/link89/webq
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/link89/webq
- Owner: link89
- License: mit
- Created: 2024-01-07T16:27:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-22T02:19:14.000Z (over 2 years ago)
- Last Synced: 2025-02-02T00:47:49.055Z (over 1 year ago)
- Language: Python
- Size: 138 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WebQ
A queue system for web applications.
## Introduction
WebQ is a backend service designed for web applications to provide queue-related capabilities.
Currently, WebQ provides the following services:
* job-queue: A producer-consumer job queue, suitable for building crowd-sourcing applications.
## Installation
```
pip install webq
```
## Getting Started
### Generate a config file
You can generate a config file by running the following command as a starting point:
```
webq config-init > config.yml
```
### Initialize the database
If you are running the service for the first time, you need to initialize the database by running the following command:
```
webq db-init config.yml
```
This command will initialize the database according to the configuration file. It will create an `admin` user during the initialization. The password of the `admin` user will be printed out in the console. You can use this password to login to the admin user.
### Running the service
You can run the service by running the following command:
```
webq start config.yml
```
After the service is started, you can visit the OpenAPI documentation at `{base_url}/docs`.
## Services
### Job Queue
`job-queue` is a producer-consumer job queue. The producer can submit `job` to the queue with data or files payload. Then consumer can apply jobs from queue and submit the result (named `commit`) back to the queue when the job is resolved. And then the producer can retrieve the result from the queue.
## TODO
* [ ] E2E test
* [ ] Command line interface for basic operations
* [ ] Third party authentication
* [ ] Webhook support
* [ ] Refactor