Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
400603f1
authored
Dec 06, 2024
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改队列
parent
a28cdd31
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
.env
app/Http/Services/SkuService.php
config/database.php
.env
View file @
400603f1
...
...
@@ -124,6 +124,12 @@ RABBITMQ2_LOGIN=guest
RABBITMQ2_PASSWORD=guest
RABBITMQ2_QUEUE=wms_service
RABBITMQ_SKU_HOST=192.168.1.252
RABBITMQ_SKU_PORT=5672
RABBITMQ_SKU_USER=guest
RABBITMQ_SKU_PASSWORD=guest
RABBITMQ_SKU_VHOST=/
#RABBITMQ_HOST=192.168.1.237
#RABBITMQ_PORT=5672
#RABBITMQ_VHOST=/
...
...
app/Http/Services/SkuService.php
View file @
400603f1
...
...
@@ -503,10 +503,10 @@ class SkuService extends BaseService
if
(
!
is_array
(
$skuIds
))
{
$skuIds
=
explode
(
','
,
trim
(
$skuIds
));
}
$conn
=
new
AMQPStreamConnection
(
config
(
'database.connections.rabbitmq
2
.host'
),
config
(
'database.connections.rabbitmq
2
.port'
),
config
(
'database.connections.rabbitmq
2
.login'
),
config
(
'database.connections.rabbitmq
2
.password'
));
$conn
=
new
AMQPStreamConnection
(
config
(
'database.connections.rabbitmq
Sku
.host'
),
config
(
'database.connections.rabbitmq
Sku
.port'
),
config
(
'database.connections.rabbitmq
Sku
.login'
),
config
(
'database.connections.rabbitmq
Sku
.password'
));
foreach
(
$skuIds
as
$skuId
)
{
$channel
=
$conn
->
channel
();
$channel
->
queue_declare
(
'lie_footstone_update_sku_info_queue'
,
false
,
true
,
false
,
false
);
...
...
config/database.php
View file @
400603f1
...
...
@@ -388,6 +388,16 @@ return [
'queue'
=>
env
(
'RABBITMQ_QUEUE'
),
// name of the default queue,
],
'rabbitmqSku'
=>
[
'driver'
=>
'rabbitmq'
,
'host'
=>
env
(
'RABBITMQ_SKU_HOST'
,
'127.0.0.1'
),
'port'
=>
env
(
'RABBITMQ_SKU_PORT'
,
5672
),
'vhost'
=>
env
(
'RABBITMQ_SKU_VHOST'
,
'/'
),
'login'
=>
env
(
'RABBITMQ_SKU_LOGIN'
,
'guest'
),
'password'
=>
env
(
'RABBITMQ_SKU_PASSWORD'
,
'guest'
),
'queue'
=>
env
(
'RABBITMQ_QUEUE'
),
// name of the default queue,
],
],
...
...
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