Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
ppt_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Li Feifei
ppt_server
Commits
96a6b53c
Commit
96a6b53c
authored
Jan 27, 2021
by
Li Feifei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
a52f7150
Pipeline
#13602
passed with stages
in 26 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
mq.go
upload/mq.go
+7
-1
No files found.
upload/mq.go
View file @
96a6b53c
...
...
@@ -31,11 +31,14 @@ func (r *RabbitMQ) mqConnect() error {
"test-rmq.offcncloud.com/"
,
5672
)
if
r
.
connection
==
nil
{
if
r
.
connection
,
err
=
amqp
.
DialConfig
(
RabbitUrl
,
amqp
.
Config
{
Vhost
:
"v.ofc.office"
});
err
!=
nil
{
beeLogger
.
Log
.
Errorf
(
"RabbitMQ Server Connect Fail: %s"
,
err
)
return
err
}
}
if
r
.
connection
==
nil
{
c
,
err
:=
r
.
connection
.
Channel
()
if
err
!=
nil
{
beeLogger
.
Log
.
Errorf
(
"Channel connet fail: %s"
,
err
)
...
...
@@ -43,6 +46,7 @@ func (r *RabbitMQ) mqConnect() error {
}
r
.
channel
=
c
beeLogger
.
Log
.
Success
(
"RabbitMQ Server is running..."
)
}
return
nil
}
...
...
@@ -64,7 +68,9 @@ func (r *RabbitMQ) mqClose() {
func
(
r
*
RabbitMQ
)
Send
(
req
map
[
string
]
interface
{})
error
{
//defer r.mqClose()
if
err
:=
r
.
mqConnect
();
err
!=
nil
{
return
err
}
bytes
,
err
:=
json
.
Marshal
(
req
)
if
err
!=
nil
{
return
err
...
...
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