Browse Source

edit

master
邝卫东 3 years ago
parent
commit
38e744bb9c
5 changed files with 9 additions and 4 deletions
  1. +2
    -1
      AmqpTest/AmqpTest.csproj
  2. +4
    -0
      AmqpTest/Program.cs
  3. +1
    -1
      AmqpTest/Properties/launchSettings.json
  4. +1
    -1
      AmqpTest/appsettings.debug.json
  5. +1
    -1
      amqp_test_run.sh

+ 2
- 1
AmqpTest/AmqpTest.csproj View File

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">
<Project Sdk="Microsoft.NET.Sdk.Worker">


<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
@@ -14,6 +14,7 @@
<PackageReference Include="Serilog" Version="2.10.0" /> <PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.AspNetCore" Version="3.4.0" /> <PackageReference Include="Serilog.AspNetCore" Version="3.4.0" />
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" /> <PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" /> <PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" /> <PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
</ItemGroup> </ItemGroup>


+ 4
- 0
AmqpTest/Program.cs View File

@@ -1,3 +1,4 @@
using AmqpTest.Amqp;
using AmqpTest.Configs; using AmqpTest.Configs;
using AmqpTest.Logs; using AmqpTest.Logs;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
@@ -66,6 +67,9 @@ namespace AmqpTest


return setting; return setting;
}; };

services.AddSingleton<AmqpSubscribe>();
services.AddHostedService<Worker>();
}); });
} }
} }


+ 1
- 1
AmqpTest/Properties/launchSettings.json View File

@@ -3,7 +3,7 @@
"AmqpTest": { "AmqpTest": {
"commandName": "Project", "commandName": "Project",
"environmentVariables": { "environmentVariables": {
"DOTNET_ENVIRONMENT": "Development"
"DOTNET_ENVIRONMENT": "debug"
} }
}, },
"Docker": { "Docker": {


+ 1
- 1
AmqpTest/appsettings.debug.json View File

@@ -4,7 +4,7 @@
"AccessKey": "LTAI4FdXhwy1evoHXingMaiZ", "AccessKey": "LTAI4FdXhwy1evoHXingMaiZ",
"AccessSecret": "CGmGpzta6ro8Bta4RLiQD18EF8m6Bm", "AccessSecret": "CGmGpzta6ro8Bta4RLiQD18EF8m6Bm",
"iotInstanceId": "iot-cn-nif1vosz501", "iotInstanceId": "iot-cn-nif1vosz501",
"ConsumerGroupId": "0ZQFQv0QreC7WALTEWad000100", //"bbQdnXQJIx2eCDjVbCIZ000100", // "hJBxHrxY51jZVhu6cCsQ000100", //"8GwMMBJUWz5PWaW0jtb6000100",
"ConsumerGroupId": "eQVdFouKAYajil208F7F000100", //"bbQdnXQJIx2eCDjVbCIZ000100", // "hJBxHrxY51jZVhu6cCsQ000100", //"8GwMMBJUWz5PWaW0jtb6000100",
"RegionId": "cn-shanghai", "RegionId": "cn-shanghai",
"ProductKey": "a18mXM6Cvx8", "ProductKey": "a18mXM6Cvx8",
"UId": "1111649216405698", "UId": "1111649216405698",


+ 1
- 1
amqp_test_run.sh View File

@@ -12,7 +12,7 @@ elif [[ ${environment} == 'test' ]]; then
docker rm amqp_test || true docker rm amqp_test || true
docker rmi -f $(docker images | grep 139.224.254.18:5000/amqp_test | awk '{print $3}') docker rmi -f $(docker images | grep 139.224.254.18:5000/amqp_test | awk '{print $3}')
docker pull 139.224.254.18:5000/amqp_test:$version docker pull 139.224.254.18:5000/amqp_test:$version
docker run -d -e environment=test -v /home/data/amqp_test/log:/var/amqp/logs --restart=always --name amqp_test 139.224.254.18:5000/amqp_test:$version;
docker run -d -e environment=test -v /home/data/amqp_test/log:/var/amqp/logs --name amqp_test 139.224.254.18:5000/amqp_test:$version;
#删除产生的None镜像 #删除产生的None镜像
docker rmi -f $(docker images | grep none | awk '{print $3}') docker rmi -f $(docker images | grep none | awk '{print $3}')
docker ps -a docker ps -a


Loading…
Cancel
Save