diff --git a/app/Console/Commands/CleanOldPush.php b/app/Console/Commands/CleanOldPushCommand.php similarity index 96% rename from app/Console/Commands/CleanOldPush.php rename to app/Console/Commands/CleanOldPushCommand.php index acbd63b..53d1d95 100644 --- a/app/Console/Commands/CleanOldPush.php +++ b/app/Console/Commands/CleanOldPushCommand.php @@ -6,7 +6,7 @@ use App\Models\PushDeerMessage; use Carbon\Carbon; -class CleanOldPush extends Command +class CleanOldPushCommand extends Command { /** * The name and signature of the console command. diff --git a/app/Console/Commands/SendNotificationApnApp.php b/app/Console/Commands/SendNotificationApnAppCommand.php similarity index 84% rename from app/Console/Commands/SendNotificationApnApp.php rename to app/Console/Commands/SendNotificationApnAppCommand.php index 43fe73a..efe2f70 100644 --- a/app/Console/Commands/SendNotificationApnApp.php +++ b/app/Console/Commands/SendNotificationApnAppCommand.php @@ -5,9 +5,9 @@ use App\Models\QueueExchangeEnum; use Illuminate\Console\Command; -class SendNotificationApnApp extends Command +class SendNotificationApnAppCommand extends Command { - use SendNotificationTrait; + use SendNotificationCommandTrait; /** * The name and signature of the console command. diff --git a/app/Console/Commands/SendNotificationApnClip.php b/app/Console/Commands/SendNotificationApnClipCommand.php similarity index 84% rename from app/Console/Commands/SendNotificationApnClip.php rename to app/Console/Commands/SendNotificationApnClipCommand.php index 7094c92..c415935 100644 --- a/app/Console/Commands/SendNotificationApnClip.php +++ b/app/Console/Commands/SendNotificationApnClipCommand.php @@ -5,9 +5,9 @@ use App\Models\QueueExchangeEnum; use Illuminate\Console\Command; -class SendNotificationApnClip extends Command +class SendNotificationApnClipCommand extends Command { - use SendNotificationTrait; + use SendNotificationCommandTrait; /** * The name and signature of the console command. diff --git a/app/Console/Commands/SendNotificationTrait.php b/app/Console/Commands/SendNotificationCommandTrait.php similarity index 85% rename from app/Console/Commands/SendNotificationTrait.php rename to app/Console/Commands/SendNotificationCommandTrait.php index f7e954a..7feb07e 100644 --- a/app/Console/Commands/SendNotificationTrait.php +++ b/app/Console/Commands/SendNotificationCommandTrait.php @@ -2,12 +2,12 @@ namespace App\Console\Commands; -use App\Services\Push\PushService; +use App\Services\Push\PushServiceInterface; use App\Services\QueueService; use PhpAmqpLib\Connection\AbstractConnection as AMQPConnection; use PhpAmqpLib\Message\AMQPMessage; -trait SendNotificationTrait +trait SendNotificationCommandTrait { /** * Execute the console command. @@ -24,7 +24,7 @@ public function handle(): void $channel->basic_consume( queue: $this->queue->value, callback: function (AMQPMessage $message) { - if (app(PushService::class)->sendBatch(unserialize($message->body))) { + if (app(PushServiceInterface::class)->sendBatch(unserialize($message->body))) { $message->ack(); } } diff --git a/app/Console/Commands/SendNotificationFcmApp.php b/app/Console/Commands/SendNotificationFcmAppCommand.php similarity index 84% rename from app/Console/Commands/SendNotificationFcmApp.php rename to app/Console/Commands/SendNotificationFcmAppCommand.php index d957289..f39a608 100644 --- a/app/Console/Commands/SendNotificationFcmApp.php +++ b/app/Console/Commands/SendNotificationFcmAppCommand.php @@ -5,9 +5,9 @@ use App\Models\QueueExchangeEnum; use Illuminate\Console\Command; -class SendNotificationFcmApp extends Command +class SendNotificationFcmAppCommand extends Command { - use SendNotificationTrait; + use SendNotificationCommandTrait; /** * The name and signature of the console command. diff --git a/app/Console/Commands/SendNotificationFcmClip.php b/app/Console/Commands/SendNotificationFcmClipCommand.php similarity index 84% rename from app/Console/Commands/SendNotificationFcmClip.php rename to app/Console/Commands/SendNotificationFcmClipCommand.php index 20a4901..1476e78 100644 --- a/app/Console/Commands/SendNotificationFcmClip.php +++ b/app/Console/Commands/SendNotificationFcmClipCommand.php @@ -5,9 +5,9 @@ use App\Models\QueueExchangeEnum; use Illuminate\Console\Command; -class SendNotificationFcmClip extends Command +class SendNotificationFcmClipCommand extends Command { - use SendNotificationTrait; + use SendNotificationCommandTrait; /** * The name and signature of the console command. diff --git a/app/Console/Commands/UpdateApnCertificate.php b/app/Console/Commands/UpdateApnCertificateCommand.php similarity index 98% rename from app/Console/Commands/UpdateApnCertificate.php rename to app/Console/Commands/UpdateApnCertificateCommand.php index 26ca358..5c50dcf 100644 --- a/app/Console/Commands/UpdateApnCertificate.php +++ b/app/Console/Commands/UpdateApnCertificateCommand.php @@ -7,7 +7,7 @@ use GuzzleHttp\RequestOptions; use Illuminate\Console\Command; -class UpdateApnCertificate extends Command +class UpdateApnCertificateCommand extends Command { /** * The name and signature of the console command. diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 5f9c30f..f6f9d93 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -2,12 +2,12 @@ namespace App\Console; -use App\Console\Commands\CleanOldPush; -use App\Console\Commands\SendNotificationApnApp; -use App\Console\Commands\SendNotificationApnClip; -use App\Console\Commands\SendNotificationFcmApp; -use App\Console\Commands\SendNotificationFcmClip; -use App\Console\Commands\UpdateApnCertificate; +use App\Console\Commands\CleanOldPushCommand; +use App\Console\Commands\SendNotificationApnAppCommand; +use App\Console\Commands\SendNotificationApnClipCommand; +use App\Console\Commands\SendNotificationFcmAppCommand; +use App\Console\Commands\SendNotificationFcmClipCommand; +use App\Console\Commands\UpdateApnCertificateCommand; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; @@ -21,12 +21,12 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule): void { - $schedule->command(SendNotificationFcmApp::class)->everyMinute(); - $schedule->command(SendNotificationFcmClip::class)->everyMinute(); - $schedule->command(SendNotificationApnApp::class)->everyMinute(); - $schedule->command(SendNotificationApnClip::class)->everyMinute(); - $schedule->command(CleanOldPush::class)->hourly(); - $schedule->command(UpdateApnCertificate::class)->daily(); +// $schedule->command(SendNotificationFcmApp::class)->everyMinute(); +// $schedule->command(SendNotificationFcmClip::class)->everyMinute(); +// $schedule->command(SendNotificationApnApp::class)->everyMinute(); +// $schedule->command(SendNotificationApnClip::class)->everyMinute(); + $schedule->command(CleanOldPushCommand::class)->hourly(); + $schedule->command(UpdateApnCertificateCommand::class)->daily(); } /** diff --git a/app/Events/DeviceNotificationProcessed.php b/app/Events/SendNotificationEvent.php similarity index 89% rename from app/Events/DeviceNotificationProcessed.php rename to app/Events/SendNotificationEvent.php index 9a0ae4c..5e73351 100644 --- a/app/Events/DeviceNotificationProcessed.php +++ b/app/Events/SendNotificationEvent.php @@ -2,19 +2,19 @@ namespace App\Events; -use App\Listeners\SendDeviceNotification; +use App\Listeners\SendNotificationListener; use App\Models\PushDeerDevice; use App\Models\PushDeerMessage; use Hhxsv5\LaravelS\Swoole\Task\Event; -class DeviceNotificationProcessed extends Event +class SendNotificationEvent extends Event { private PushDeerDevice $device; private PushDeerMessage $message; protected $listeners = [ // 监听器列表 - SendDeviceNotification::class, + SendNotificationListener::class, ]; /** diff --git a/app/Listeners/SendDeviceNotification.php b/app/Listeners/SendNotificationListener.php similarity index 68% rename from app/Listeners/SendDeviceNotification.php rename to app/Listeners/SendNotificationListener.php index 0cb4450..755659b 100644 --- a/app/Listeners/SendDeviceNotification.php +++ b/app/Listeners/SendNotificationListener.php @@ -2,30 +2,21 @@ namespace App\Listeners; -use App\Events\DeviceNotificationProcessed; +use App\Events\SendNotificationEvent; use App\Services\Push\ApnAppService; use App\Services\Push\ApnClipService; use App\Services\Push\FcmAppService; use App\Services\Push\FcmClipService; +use App\Services\Push\PushService; use Hhxsv5\LaravelS\Swoole\Task\Event; use Hhxsv5\LaravelS\Swoole\Task\Listener; -class SendDeviceNotification extends Listener +class SendNotificationListener extends Listener { - /** - * Create the event listener. - * - * @return void - */ - public function __construct() - { - // - } - /** * Handle the event. * - * @param DeviceNotificationProcessed $event + * @param SendNotificationEvent $event * @return void */ public function handle(Event $event): void @@ -36,6 +27,7 @@ public function handle(Event $event): void 'ios' => $device->is_clip ? ApnClipService::class : ApnAppService::class, 'android' => $device->is_clip ? FcmClipService::class : FcmAppService::class, }; - app($channel)->send($device, $message); + + app(PushService::class, ['service' => app($channel)])->send($device, $message); } } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index e3502a7..0152acf 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -2,10 +2,10 @@ namespace App\Providers; -use App\Console\Commands\SendNotificationApnApp; -use App\Console\Commands\SendNotificationApnClip; -use App\Console\Commands\SendNotificationFcmApp; -use App\Console\Commands\SendNotificationFcmClip; +use App\Console\Commands\SendNotificationApnAppCommand; +use App\Console\Commands\SendNotificationApnClipCommand; +use App\Console\Commands\SendNotificationFcmAppCommand; +use App\Console\Commands\SendNotificationFcmClipCommand; use App\Http\ReturnCode; use App\Services\AppleService; use App\Services\MessageService; @@ -13,7 +13,7 @@ use App\Services\Push\ApnClipService; use App\Services\Push\FcmAppService; use App\Services\Push\FcmClipService; -use App\Services\Push\PushService; +use App\Services\Push\PushServiceInterface; use App\Services\PushDeerDeviceService; use App\Services\PushDeerKeyService; use App\Services\PushDeerMessageService; @@ -87,41 +87,33 @@ public function boot(): void $this->app->singleton(ApnAppService::class, function () { return new ApnAppService(); }); - $this->app->when(SendNotificationApnApp::class) - ->needs(PushService::class) - ->give(function () { - return $this->app->make(ApnAppService::class); - }); + $this->app->when(SendNotificationApnAppCommand::class) + ->needs(PushServiceInterface::class) + ->give(ApnAppService::class); // push-apn-clip $this->app->singleton(ApnClipService::class, function () { return new ApnClipService(); }); - $this->app->when(SendNotificationApnClip::class) - ->needs(PushService::class) - ->give(function () { - return $this->app->make(ApnClipService::class); - }); + $this->app->when(SendNotificationApnClipCommand::class) + ->needs(PushServiceInterface::class) + ->give(ApnClipService::class); // push-fcm-app $this->app->singleton(FcmAppService::class, function () { return new FcmAppService(); }); - $this->app->when(SendNotificationFcmApp::class) - ->needs(PushService::class) - ->give(function () { - return $this->app->make(FcmAppService::class); - }); + $this->app->when(SendNotificationFcmAppCommand::class) + ->needs(PushServiceInterface::class) + ->give(FcmAppService::class); // push-fcm-clip $this->app->singleton(FcmClipService::class, function () { return new FcmClipService(); }); - $this->app->when(SendNotificationFcmClip::class) - ->needs(PushService::class) - ->give(function () { - return $this->app->make(FcmClipService::class); - }); + $this->app->when(SendNotificationFcmClipCommand::class) + ->needs(PushServiceInterface::class) + ->give(FcmClipService::class); } } diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 96c417e..1ec6b35 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -2,8 +2,6 @@ namespace App\Providers; -use App\Events\DeviceNotificationProcessed; -use App\Listeners\SendDeviceNotification; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; use Illuminate\Support\Facades\Event; use Laravel\Telescope\Telescope; diff --git a/app/Services/Push/ApnServiceAbstract.php b/app/Services/Push/ApnServiceAbstract.php index 33f57a7..daf3910 100644 --- a/app/Services/Push/ApnServiceAbstract.php +++ b/app/Services/Push/ApnServiceAbstract.php @@ -48,11 +48,10 @@ protected function addNotification(array $packages): Client */ public function send(PushDeerDevice $device, PushDeerMessage $message, int $tries = 1): bool { - $client = $this->addNotification([ + $client = $this->addNotification([[ 'message' => $message, 'device' => $device, - ]); - + ]]); return $this->executor($client, $tries); } diff --git a/app/Services/Push/PushService.php b/app/Services/Push/PushService.php index 70ff8d0..e39d47f 100644 --- a/app/Services/Push/PushService.php +++ b/app/Services/Push/PushService.php @@ -4,7 +4,6 @@ use App\Models\PushDeerDevice; use App\Models\PushDeerMessage; -use PhpAmqpLib\Message\AMQPMessage; class PushService implements PushServiceInterface { diff --git a/app/Services/PushDeerMessageService.php b/app/Services/PushDeerMessageService.php index 3a14af5..c886646 100644 --- a/app/Services/PushDeerMessageService.php +++ b/app/Services/PushDeerMessageService.php @@ -2,6 +2,7 @@ namespace App\Services; +use App\Events\SendNotificationEvent; use App\Http\ReturnCode; use App\Models\PushDeerDevice; use App\Models\PushDeerKey; @@ -9,6 +10,7 @@ use App\Models\PushDeerUser; use App\Models\QueueExchangeEnum; use App\Models\RoutingKeyEnum; +use Hhxsv5\LaravelS\Swoole\Task\Event; use Illuminate\Support\Facades\Auth; use Str; @@ -44,7 +46,8 @@ public function push(array $data): void $result = []; $queueMessages = []; - $keys->each(function (PushDeerKey $key) use (&$data, &$queueMessages) { + $queueMessageCount = 0; + $keys->each(function (PushDeerKey $key) use (&$data, &$queueMessages, &$queueMessageCount) { if ($key->userDevices->count() < 1) { $this->message->addMessage(ReturnCode::ARGS, $key->name . ' 没有可用的设备,请先注册'); } @@ -59,30 +62,30 @@ public function push(array $data): void $message->save(); $message->text = $message->type == 'image' ? '[图片]' : $message->text; - $key->userDevices->each(function (PushDeerDevice $device) use (&$queueMessages, $message) { + $key->userDevices->each(function (PushDeerDevice $device) use (&$queueMessages, $message, &$queueMessageCount) { // 方式一:异步事件,Swoole进程通信 - // Event::fire((new DeviceNotificationProcessed($device, $message))->setTries(3)); - $routingKey = match ($device->type) { - 'ios' => $device->is_clip ? RoutingKeyEnum::NOTIFICATION_APN_CLIP : RoutingKeyEnum::NOTIFICATION_APN_APP, - 'android' => $device->is_clip ? RoutingKeyEnum::NOTIFICATION_FCM_CLIP : RoutingKeyEnum::NOTIFICATION_FCM_APP, - }; - $queueMessages[$routingKey->value][] = [ - 'device' => $device, - 'message' => $message, - ]; + Event::fire((new SendNotificationEvent($device, $message))->setTries(3)); + $queueMessageCount += 1; +// $routingKey = match ($device->type) { +// 'ios' => $device->is_clip ? RoutingKeyEnum::NOTIFICATION_APN_CLIP : RoutingKeyEnum::NOTIFICATION_APN_APP, +// 'android' => $device->is_clip ? RoutingKeyEnum::NOTIFICATION_FCM_CLIP : RoutingKeyEnum::NOTIFICATION_FCM_APP, +// }; +// $queueMessages[$routingKey->value][] = [ +// 'device' => $device, +// 'message' => $message, +// ]; }); }); // 方式二:异步队列,RabbitMQ - $queueMessageCount = 0; - foreach ($queueMessages as $routingKey => $items) { - $queueMessageCount += count($items); - app(QueueService::class)->publish( - data: $items, - exchange: QueueExchangeEnum::NOTIFICATION_EXCHANGE, - routingKey: RoutingKeyEnum::from($routingKey) - ); - } +// foreach ($queueMessages as $routingKey => $items) { +// $queueMessageCount += count($items); +// app(QueueService::class)->publish( +// data: $items, +// exchange: QueueExchangeEnum::NOTIFICATION_EXCHANGE, +// routingKey: RoutingKeyEnum::from($routingKey) +// ); +// } $result[] = json_encode([ 'counts' => $queueMessageCount, diff --git a/composer.lock b/composer.lock index ec8070c..e8c26bb 100644 --- a/composer.lock +++ b/composer.lock @@ -529,7 +529,7 @@ "version": "3.0.0", "dist": { "type": "zip", - "url": "https://mirrors.cloud.tencent.com/repository/composer/doctrine/lexer/3.0.0/doctrine-lexer-3.0.0.zip", + "url": "https://mirrors.tencent.com/repository/composer/doctrine/lexer/3.0.0/doctrine-lexer-3.0.0.zip", "reference": "84a527db05647743d50373e0ec53a152f2cde568", "shasum": "" }, @@ -3012,7 +3012,7 @@ "version": "v4.15.4", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/nikic/php-parser/v4.15.4/nikic-php-parser-v4.15.4.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/nikic/php-parser/v4.15.4/nikic-php-parser-v4.15.4.zip", "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290", "shasum": "" }, @@ -3350,7 +3350,7 @@ "version": "2.3.0", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/php-http/httplug/2.3.0/php-http-httplug-2.3.0.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/php-http/httplug/2.3.0/php-http-httplug-2.3.0.zip", "reference": "f640739f80dfa1152533976e3c112477f69274eb", "shasum": "" }, @@ -3402,7 +3402,7 @@ "version": "1.1.0", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/php-http/promise/1.1.0/php-http-promise-1.1.0.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/php-http/promise/1.1.0/php-http-promise-1.1.0.zip", "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88", "shasum": "" }, @@ -3590,7 +3590,7 @@ "version": "3.0.0", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/psr/cache/3.0.0/psr-cache-3.0.0.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/psr/cache/3.0.0/psr-cache-3.0.0.zip", "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", "shasum": "" }, @@ -3711,7 +3711,7 @@ "version": "1.0.0", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/psr/event-dispatcher/1.0.0/psr-event-dispatcher-1.0.0.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/psr/event-dispatcher/1.0.0/psr-event-dispatcher-1.0.0.zip", "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", "shasum": "" }, @@ -3751,7 +3751,7 @@ "version": "1.0.1", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/psr/http-client/1.0.1/psr-http-client-1.0.1.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/psr/http-client/1.0.1/psr-http-client-1.0.1.zip", "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", "shasum": "" }, @@ -3794,7 +3794,7 @@ "version": "1.0.1", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/psr/http-factory/1.0.1/psr-http-factory-1.0.1.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/psr/http-factory/1.0.1/psr-http-factory-1.0.1.zip", "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", "shasum": "" }, @@ -3840,7 +3840,7 @@ "version": "1.0.1", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/psr/http-message/1.0.1/psr-http-message-1.0.1.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/psr/http-message/1.0.1/psr-http-message-1.0.1.zip", "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, @@ -4033,7 +4033,7 @@ "version": "3.0.3", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/ralouphie/getallheaders/3.0.3/ralouphie-getallheaders-3.0.3.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/ralouphie/getallheaders/3.0.3/ralouphie-getallheaders-3.0.3.zip", "reference": "120b605dfeb996808c31b6477290a714d356e822", "shasum": "" }, @@ -4136,8 +4136,8 @@ "version": "4.x-dev", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/ramsey/uuid/4.x-dev/ramsey-uuid-4.x-dev.zip", - "reference": "bf2bee216a4379eaf62162307d62bb7850405fec", + "url": "https://mirrors.cloud.tencent.com/repository/composer/ramsey/uuid/4.x-dev/ramsey-uuid-4.x-dev.zip", + "reference": "8e955307d32dc9b6992440ff81321d3cb09db75a", "shasum": "" }, "require": { @@ -4201,7 +4201,7 @@ "identifier", "uuid" ], - "time": "2023-02-07T16:14:23+00:00" + "time": "2023-03-27T22:05:11+00:00" }, { "name": "riverline/multipart-parser", @@ -4431,7 +4431,7 @@ "version": "v6.2.7", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/symfony/cache/v6.2.7/symfony-cache-v6.2.7.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/symfony/cache/v6.2.7/symfony-cache-v6.2.7.zip", "reference": "01a36b32f930018764bcbde006fbbe421fa6b61e", "shasum": "" }, @@ -4560,7 +4560,7 @@ "version": "v6.2.7", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/symfony/console/v6.2.7/symfony-console-v6.2.7.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/symfony/console/v6.2.7/symfony-console-v6.2.7.zip", "reference": "cbad09eb8925b6ad4fb721c7a179344dc4a19d45", "shasum": "" }, @@ -4879,7 +4879,7 @@ "version": "v3.2.1", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/symfony/event-dispatcher-contracts/v3.2.1/symfony-event-dispatcher-contracts-v3.2.1.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/symfony/event-dispatcher-contracts/v3.2.1/symfony-event-dispatcher-contracts-v3.2.1.zip", "reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd", "shasum": "" }, @@ -4935,7 +4935,7 @@ "version": "v6.2.7", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/symfony/finder/v6.2.7/symfony-finder-v6.2.7.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/symfony/finder/v6.2.7/symfony-finder-v6.2.7.zip", "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb", "shasum": "" }, @@ -5175,7 +5175,7 @@ "version": "v6.2.7", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/symfony/mime/v6.2.7/symfony-mime-v6.2.7.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/symfony/mime/v6.2.7/symfony-mime-v6.2.7.zip", "reference": "62e341f80699badb0ad70b31149c8df89a2d778e", "shasum": "" }, @@ -5235,7 +5235,7 @@ "version": "v1.27.0", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/symfony/polyfill-ctype/v1.27.0/symfony-polyfill-ctype-v1.27.0.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/symfony/polyfill-ctype/v1.27.0/symfony-polyfill-ctype-v1.27.0.zip", "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, @@ -5416,7 +5416,7 @@ "version": "v1.27.0", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/symfony/polyfill-intl-normalizer/v1.27.0/symfony-polyfill-intl-normalizer-v1.27.0.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/symfony/polyfill-intl-normalizer/v1.27.0/symfony-polyfill-intl-normalizer-v1.27.0.zip", "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", "shasum": "" }, @@ -5477,7 +5477,7 @@ "version": "v1.27.0", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/symfony/polyfill-mbstring/v1.27.0/symfony-polyfill-mbstring-v1.27.0.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/symfony/polyfill-mbstring/v1.27.0/symfony-polyfill-mbstring-v1.27.0.zip", "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, @@ -5590,7 +5590,7 @@ "version": "v1.27.0", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/symfony/polyfill-php80/v1.27.0/symfony-polyfill-php80-v1.27.0.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/symfony/polyfill-php80/v1.27.0/symfony-polyfill-php80-v1.27.0.zip", "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, @@ -5709,7 +5709,7 @@ "version": "v6.2.7", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/symfony/process/v6.2.7/symfony-process-v6.2.7.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/symfony/process/v6.2.7/symfony-process-v6.2.7.zip", "reference": "680e8a2ea6b3f87aecc07a6a65a203ae573d1902", "shasum": "" }, @@ -5874,7 +5874,7 @@ "version": "v6.2.7", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/symfony/string/v6.2.7/symfony-string-v6.2.7.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/symfony/string/v6.2.7/symfony-string-v6.2.7.zip", "reference": "67b8c1eec78296b85dc1c7d9743830160218993d", "shasum": "" }, @@ -5937,7 +5937,7 @@ "version": "v6.2.7", "dist": { "type": "zip", - "url": "https://mirrors.cloud.tencent.com/repository/composer/symfony/translation/v6.2.7/symfony-translation-v6.2.7.zip", + "url": "https://mirrors.tencent.com/repository/composer/symfony/translation/v6.2.7/symfony-translation-v6.2.7.zip", "reference": "90db1c6138c90527917671cd9ffa9e8b359e3a73", "shasum": "" }, @@ -6012,7 +6012,7 @@ "version": "v3.2.1", "dist": { "type": "zip", - "url": "https://mirrors.cloud.tencent.com/repository/composer/symfony/translation-contracts/v3.2.1/symfony-translation-contracts-v3.2.1.zip", + "url": "https://mirrors.tencent.com/repository/composer/symfony/translation-contracts/v3.2.1/symfony-translation-contracts-v3.2.1.zip", "reference": "dfec258b9dd17a6b24420d464c43bffe347441c8", "shasum": "" }, @@ -6121,7 +6121,7 @@ "version": "v6.2.7", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/symfony/var-dumper/v6.2.7/symfony-var-dumper-v6.2.7.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/symfony/var-dumper/v6.2.7/symfony-var-dumper-v6.2.7.zip", "reference": "cf8d4ca1ddc1e3cc242375deb8fc23e54f5e2a1e", "shasum": "" }, @@ -6695,7 +6695,7 @@ "version": "1.11.0", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/webmozart/assert/1.11.0/webmozart-assert-1.11.0.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/webmozart/assert/1.11.0/webmozart-assert-1.11.0.zip", "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, @@ -7978,7 +7978,7 @@ "version": "1.11.1", "dist": { "type": "zip", - "url": "https://mirrors.tencent.com/repository/composer/myclabs/deep-copy/1.11.1/myclabs-deep-copy-1.11.1.zip", + "url": "https://mirrors.cloud.tencent.com/repository/composer/myclabs/deep-copy/1.11.1/myclabs-deep-copy-1.11.1.zip", "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, @@ -8267,11 +8267,11 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.7.0", + "version": "1.7.1", "dist": { "type": "zip", - "url": "https://mirrors.cloud.tencent.com/repository/composer/phpdocumentor/type-resolver/1.7.0/phpdocumentor-type-resolver-1.7.0.zip", - "reference": "1534aea9bde19a5c85c5d1e1f834ab63f4c5dcf5", + "url": "https://mirrors.cloud.tencent.com/repository/composer/phpdocumentor/type-resolver/1.7.1/phpdocumentor-type-resolver-1.7.1.zip", + "reference": "dfc078e8af9c99210337325ff5aa152872c98714", "shasum": "" }, "require": { @@ -8311,7 +8311,7 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2023-03-12T10:13:29+00:00" + "time": "2023-03-27T19:02:04+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -8588,11 +8588,11 @@ }, { "name": "phpunit/phpunit", - "version": "10.0.18", + "version": "10.0.19", "dist": { "type": "zip", - "url": "https://mirrors.cloud.tencent.com/repository/composer/phpunit/phpunit/10.0.18/phpunit-phpunit-10.0.18.zip", - "reference": "582563ed2edc62d1455cdbe00ea49fe09428eef3", + "url": "https://mirrors.cloud.tencent.com/repository/composer/phpunit/phpunit/10.0.19/phpunit-phpunit-10.0.19.zip", + "reference": "20c23e85c86e5c06d63538ba464e8054f4744e62", "shasum": "" }, "require": { @@ -8660,7 +8660,7 @@ "testing", "xunit" ], - "time": "2023-03-22T06:15:31+00:00" + "time": "2023-03-27T11:46:33+00:00" }, { "name": "sebastian/cli-parser", diff --git a/docker-compose-develop.yml b/docker-compose-develop.yml index 785ee59..ceff832 100644 --- a/docker-compose-develop.yml +++ b/docker-compose-develop.yml @@ -29,23 +29,23 @@ services: # - '5601:5601' # volumes: # - 'kibana_data:/bitnami/kibana' - rabbitmq: - image: 'bitnami/rabbitmq:latest' - healthcheck: - test: [ 'CMD', 'rabbitmq-diagnostics', 'check_port_connectivity' ] - interval: 5s - timeout: 5s - start_period: 10s - retries: 3 - environment: - - RABBITMQ_USERNAME=pushdeer - - RABBITMQ_PASSWORD=theVeryp@ssw0rd +# rabbitmq: +# image: 'bitnami/rabbitmq:latest' +# healthcheck: +# test: [ 'CMD', 'rabbitmq-diagnostics', 'check_port_connectivity' ] +# interval: 5s +# timeout: 5s +# start_period: 10s +# retries: 3 +# environment: +# - RABBITMQ_USERNAME=pushdeer +# - RABBITMQ_PASSWORD=theVeryp@ssw0rd # - RABBITMQ_PLUGINS=rabbitmq_delayed_message_exchange # - RABBITMQ_COMMUNITY_PLUGINS=https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases/download/3.11.1/rabbitmq_delayed_message_exchange-3.11.1.ez - ports: - - '15672:15672' - volumes: - - 'rabbitmq_data:/bitnami/rabbitmq/mnesia' +# ports: +# - '15672:15672' +# volumes: +# - 'rabbitmq_data:/bitnami/rabbitmq/mnesia' mariadb: image: 'bitnami/mariadb:latest' healthcheck: @@ -92,8 +92,8 @@ services: condition: service_healthy # elasticsearch: # condition: service_healthy - rabbitmq: - condition: service_healthy +# rabbitmq: +# condition: service_healthy environment: - DISABLE_DEFAULT_SERVER=1 - APP_DEBUG=true @@ -102,7 +102,7 @@ services: - LARAVELS_INOTIFY_RELOAD=true - LARAVELS_TIMER=false - LARAVELS_WORKER_NUM=2 - - LARAVELS_TASK_WORKER_NUM=4 + - LARAVELS_TASK_WORKER_NUM=2 - TELESCOPE_ENABLED=true - TELESCOPE_COMMAND_WATCHER=false - APN_CERTIFICATE_SECRET=64wtMhU4mULj @@ -117,4 +117,4 @@ volumes: # elasticsearch_data: # kibana_data: mariadb_data: - rabbitmq_data: \ No newline at end of file +# rabbitmq_data: \ No newline at end of file diff --git a/docker-compose-product.yml b/docker-compose-product.yml index 6baeec9..17007c2 100644 --- a/docker-compose-product.yml +++ b/docker-compose-product.yml @@ -29,23 +29,23 @@ services: # - '5601:5601' # volumes: # - 'kibana_data:/bitnami/kibana' - rabbitmq: - image: 'bitnami/rabbitmq:latest' - healthcheck: - test: [ 'CMD', 'rabbitmq-diagnostics', 'check_port_connectivity' ] - interval: 5s - timeout: 5s - start_period: 10s - retries: 3 - environment: - - RABBITMQ_USERNAME=pushdeer - - RABBITMQ_PASSWORD=theVeryp@ssw0rd +# rabbitmq: +# image: 'bitnami/rabbitmq:latest' +# healthcheck: +# test: [ 'CMD', 'rabbitmq-diagnostics', 'check_port_connectivity' ] +# interval: 5s +# timeout: 5s +# start_period: 10s +# retries: 3 +# environment: +# - RABBITMQ_USERNAME=pushdeer +# - RABBITMQ_PASSWORD=theVeryp@ssw0rd # - RABBITMQ_PLUGINS=rabbitmq_delayed_message_exchange # - RABBITMQ_COMMUNITY_PLUGINS=https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases/download/3.11.1/rabbitmq_delayed_message_exchange-3.11.1.ez - ports: - - '15672:15672' - volumes: - - 'rabbitmq_data:/bitnami/rabbitmq/mnesia' +# ports: +# - '15672:15672' +# volumes: +# - 'rabbitmq_data:/bitnami/rabbitmq/mnesia' mariadb: image: 'bitnami/mariadb:latest' healthcheck: @@ -92,12 +92,12 @@ services: condition: service_healthy # elasticsearch: # condition: service_healthy - rabbitmq: - condition: service_healthy +# rabbitmq: +# condition: service_healthy environment: - DISABLE_DEFAULT_SERVER=1 - - LARAVELS_WORKER_NUM=4 - - LARAVELS_TASK_WORKER_NUM=8 + - LARAVELS_WORKER_NUM=2 + - LARAVELS_TASK_WORKER_NUM=2 - APN_CERTIFICATE_SECRET=64wtMhU4mULj - APN_BUNDLE_ID_APP=com.pushdeer.self.ios - APN_BUNDLE_ID_CLIP=com.pushdeer.self.ios.Clip @@ -110,4 +110,4 @@ volumes: # elasticsearch_data: # kibana_data: mariadb_data: - rabbitmq_data: \ No newline at end of file +# rabbitmq_data: \ No newline at end of file