Deployment and Maintenance / Admin Tools
This article mainly introduces how to use admin tools to maintain DataFlux Func.
1. Admin Tool admin-tool.py
DataFlux Func provides an admin tool for emergency maintenance tasks.
The admin tool is included in the container and needs to be run using Docker exec. You can use --help
to view specific usage:
Bash | |
---|---|
1 |
|
Text Only | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
1.1 Reset Admin Password
The password of a regular user can be reset directly by the system admin, but if the system admin forgets their password, the admin tool provided by DataFlux Func needs to be used to reset it.
For details, please refer to Deployment and Maintenance / Admin Tools
1.2 Reset Database Upgrade Sequence
DataFlux Func automatically updates the database structure during installation/upgrade and records the current database structure version sequence.
In some cases, if this sequence is incorrect, it may cause the system to fail to start normally. In such cases, the admin tool needs to be used to correct it.
If you are not sure what this is, please consult the official documentation before proceeding
The specific commands are as follows:
- Outside the container
Bash | |
---|---|
1 |
|
- Inside the container
Bash | |
---|---|
1 |
|
1.3 Clear Redis
In some cases (e.g., queue blockage needs immediate recovery, unreasonable script logic causing excessive cache, etc.), the following command can be used to clear the Redis database.
Clearing Redis will not cause problems for the operation of DataFlux Func itself. However, running business code may depend on data in Redis, so please confirm before proceeding
The specific commands are as follows:
- Outside the container
Bash | |
---|---|
1 |
|
- Or inside the container
Bash | |
---|---|
1 |
|
2. Directly Operate Redis
If you need to directly operate Redis, you can enter the Redis terminal to perform operations.
The specific command is as follows:
Bash | |
---|---|
1 |
|
DataFlux Func uses Redis database 5 by default
```