|
@@ -2,6 +2,7 @@ const crypto = require('crypto');
|
|
|
class tools {
|
|
|
constructor(redis_help){
|
|
|
this.redis_help = redis_help
|
|
|
+ this.isDebug = false
|
|
|
}
|
|
|
|
|
|
init(){
|
|
@@ -87,6 +88,54 @@ class tools {
|
|
|
async getHyToken (){
|
|
|
return await this.redis_help.getKeyValue("hei_yan_token")
|
|
|
}
|
|
|
+
|
|
|
+ getSupdate(){ //插入素材域名
|
|
|
+ if(this.isDebug){
|
|
|
+ return 'https://clipvideoup.hainanmlwl.com'
|
|
|
+ }else{
|
|
|
+ return 'http://192.168.0.165:9606'
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ getDataBaseConfig(){
|
|
|
+ if(this.isDebug){
|
|
|
+ return {
|
|
|
+ host: '127.0.0.1', // 数据库主机名
|
|
|
+ user: 'root', // 数据库用户名
|
|
|
+ port: 3306,
|
|
|
+ password: 'p0LTZh&CjMl2023', // 数据库密码
|
|
|
+ database: 'ml_oceanengine' // 要连接的数据库名
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ return {
|
|
|
+ host: 'mr-dsq824ev2pqxbr6rhw.rwlb.rds.aliyuncs.com', // 数据库主机名
|
|
|
+ user: 'zdroot', // 数据库用户名
|
|
|
+ port: 3306,
|
|
|
+ password: 'p0LTZh&CjMl2023', // 数据库密码
|
|
|
+ database: 'ml_oceanengine' // 要连接的数据库名
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ getTaskDataBaseConfig(){
|
|
|
+ if(this.isDebug){
|
|
|
+ return {
|
|
|
+ host: '127.0.0.1', // 数据库主机名
|
|
|
+ user: 'root', // 数据库用户名
|
|
|
+ port: 3306,
|
|
|
+ password: 'p0LTZh&CjMl2023', // 数据库密码
|
|
|
+ database: 'ml_oceanengine' // 要连接的数据库名
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ return {
|
|
|
+ host: 'mr-dsq824ev2pqxbr6rhw.rwlb.rds.aliyuncs.com', // 数据库主机名
|
|
|
+ user: 'zdroot', // 数据库用户名
|
|
|
+ port: 3306,
|
|
|
+ password: 'p0LTZh&CjMl2023', // 数据库密码
|
|
|
+ database: 'video_task' // 要连接的数据库名
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
module.exports = new tools(require('./src/use_redis'));
|