Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ai-api-mgr
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
ai-api-mgr
Commits
dac0d0e0
Commit
dac0d0e0
authored
Feb 26, 2024
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
default log is debug
parent
6f07b90c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
main.go
main.go
+5
-6
No files found.
main.go
View file @
dac0d0e0
...
@@ -460,7 +460,7 @@ func main() {
...
@@ -460,7 +460,7 @@ func main() {
flag
.
BoolVar
(
&
withBillDb
,
"withbilldb"
,
true
,
"enable with bill db, or simulate"
)
flag
.
BoolVar
(
&
withBillDb
,
"withbilldb"
,
true
,
"enable with bill db, or simulate"
)
flag
.
IntVar
(
&
logLevel
,
"loglevel"
,
0
,
"log level,default is debug,LevelDebug Level = -4 LevelInfo Level = 0 LevelWarn Level = 4 LevelError Level = 8 "
)
flag
.
IntVar
(
&
logLevel
,
"loglevel"
,
-
4
,
"log level,default is debug,LevelDebug Level = -4 LevelInfo Level = 0 LevelWarn Level = 4 LevelError Level = 8 "
)
flag
.
Parse
()
flag
.
Parse
()
...
@@ -628,7 +628,7 @@ func ApiAndJWT(c *fiber.Ctx) error {
...
@@ -628,7 +628,7 @@ func ApiAndJWT(c *fiber.Ctx) error {
pbMsg
:=
pbUpstream
.
TaskContent
{
pbMsg
:=
pbUpstream
.
TaskContent
{
TaskId
:
reqHeaders
[
"Task-Id"
][
0
],
TaskId
:
reqHeaders
[
"Task-Id"
][
0
],
TaskType
:
uint64
(
task
.
ID
),
TaskType
:
uint64
(
task
.
ID
),
TaskKind
:
1
,
TaskKind
:
pbUpstream
.
TaskKind
(
task
.
Kind
)
,
TaskCmd
:
task
.
Cmd
,
TaskCmd
:
task
.
Cmd
,
TaskParam
:
c
.
Body
(),
//[]byte(reqHeaders["Task-Id"][0]),
TaskParam
:
c
.
Body
(),
//[]byte(reqHeaders["Task-Id"][0]),
TaskTimestamp
:
uint64
(
time
.
Now
()
.
UnixNano
()),
TaskTimestamp
:
uint64
(
time
.
Now
()
.
UnixNano
()),
...
@@ -688,10 +688,9 @@ func ApiAndJWT(c *fiber.Ctx) error {
...
@@ -688,10 +688,9 @@ func ApiAndJWT(c *fiber.Ctx) error {
//fmt.Println("asyncMode-----------", asyncMode)
//fmt.Println("asyncMode-----------", asyncMode)
if
asyncMode
{
if
asyncMode
{
//time.Sleep(10 * time.Second)
time
.
Sleep
(
10
*
time
.
Second
)
m
:=
make
([]
byte
,
1024
*
1024
+
1024
*
512
)
m
:=
make
([]
byte
,
1024
*
1024
)
return
c
.
Send
(
m
)
return
c
.
SendString
(
string
(
m
))
//return c.SendString(pbMsg.TaskId)
//return c.SendString(pbMsg.TaskId)
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment