- 在 main.go 中启动缓存、代理池和任务管理 - 重构 Redis 客户端的初始化方法为 Start - 在 merchant_info.go 中添加通过名称获取商户信息的方法 - 在 merchant_deploy_info.go 中添加根据 roadUid 获取商户部署信息的方法 - 在 order_info.go 中添加获取随机订单的方法 - 新增任务相关功能,包括 FakeOrderTask 和任务调度 - 在 utils 中重构代理池的初始化方法为 StartProxyPool - 添加 order_test.go 测试文件
14 lines
234 B
Go
14 lines
234 B
Go
package tasks
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"github.com/widuu/gojson"
|
|
)
|
|
|
|
func TestFakeOrderTask(t *testing.T) {
|
|
result := gojson.Json(`{"wrongOrder":[1234567890,1234567890]}`).Get("wrongOrder").StringtoArray()
|
|
fmt.Println(result)
|
|
}
|