Metadata-Version: 2.1
Name: django-simpletask2-server
Version: 0.0.8
Summary: Django simpletask2 handler server.
Home-page: UNKNOWN
Author: zencore
Author-email: dobetter@zencore.cn
License: MIT
Keywords: django-simpletask2
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Description-Content-Type: text/markdown
License-File: LICENSE

# django-simpletask2-server

The server program used with django-simpletask2. After startup, it can automatically process the asynchronous processing tasks generated by django-simpletask2.

## Install

```
pip install django-simpletask2-server
```

## Usage

```
test@test django-simpletask2-server % django-simpletask2-server --help
Usage: django-simpletask2-server [OPTIONS] COMMAND [ARGS]...

Options:
  --logfmt TEXT
  --logfile TEXT
  --loglevel TEXT
  --pidfile TEXT                  pidfile file path.
  --workspace TEXT                Set running folder
  --daemon / --no-daemon          Run application in background or in
                                  foreground.
  -c, --config TEXT               Config file path. Application will search
                                  config file if this option is missing. Use
                                  sub-command show-config-fileapaths to get
                                  the searching tactics.
  --error-sleep INTEGER
  --idle-sleep INTEGER
  -t, --threads INTEGER
  --auto-reset-task-interval INTEGER
  --do-auto-reset-task / --no-do-auto-reset-task
  --task-pull-timeout INTEGER
  --task-pull-engine TEXT
  --channel-flags-template TEXT
  --channel-name-strip-regex TEXT
  --channel-name-template TEXT
  --channels TEXT
  -r, --redis TEXT
  -a, --aclkey TEXT
  -s, --server TEXT
  --help                          Show this message and exit.

Commands:
  restart                Restart Daemon application.
  show-config-filepaths  Print out the config searching paths.
  show-configs           Print out the final config items.
  start                  Start daemon application.
  stop                   Stop daemon application.

```

## Config items

- server: Required. Default to: http://127.0.0.1:8000/django-simpletask2/。
- aclkey: Required. No default value.
- redis: It is required when task-pull-engine is "redis". The value format likes: redis://:password@redis-server:redis-port/redis-db?decode_responses=True (The option decode_responses=True is required)
- channels: Required. Default to "default".
- threads: Required. Default to 1.
- task-pull-engine Required. Default to "redis". Other options are: api.
- idle_sleep: Default to 5 seconds.
- error_sleep: Default to 5 seconds.
- Other config items like logdevel, logfile, logfmt, workspace, pidfile, daemon and so on, see details of `daemon-application`.

## Releases

### v0.0.8

- Doc update.

### v0.0.7

- Fix --channels option short name conflict problem.

### v0.0.6

- First release.


