feat: optimize mj notidy api, use job queue to send ai drawing request

This commit is contained in:
RockYang
2023-09-13 15:50:00 +08:00
parent 1d3acc8ed3
commit 2e13ddf405
3 changed files with 37 additions and 30 deletions

View File

@@ -2,11 +2,12 @@ package main
import (
"fmt"
"path/filepath"
"net/url"
)
func main() {
imageURL := "https://cdn.discordapp.com/attachments/1151037077308325901/1151286701717733416/jiangjin_a_chrysanthemum_in_the_style_of_Van_Gogh_49b64011-6581-469d-9888-c285ab964e08.png"
parse, _ := url.Parse("http://localhost:5678/static")
fmt.Println(filepath.Ext(filepath.Base(imageURL)))
imgURLPrefix := fmt.Sprintf("%s://%s", parse.Scheme, parse.Host)
fmt.Println(imgURLPrefix)
}