You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.
Make sure you read Issues Guideline and answer these questions before submitting your issue. Thanks!
(Any non-English issues will be closed immediately.)
Please provide your PHP and Swoole version. (php -v and php --ri swoole)
PHP 7.4.16 (cli) (built: Mar 6 2021 04:24:10) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
swoole
Swoole => enabled
Author => Swoole Team <[email protected]>
Version => 4.6.5
Built => Apr 14 2021 20:52:21
coroutine => enabled with boost asm context
epoll => enabled
eventfd => enabled
signalfd => enabled
spinlock => enabled
rwlock => enabled
zlib => 1.2.11
brotli => E16777225/D16777225
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
async_redis => enabled
Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => On => On
swoole.unixsock_buffer_size => 8388608 => 8388608
Please provide your Laravel/Lumen version.
Laravel Framework 8.37.0
Which release version of this package are you using?
^2.8
What did you do? If possible, provide a recipe for reproducing the error.
<?php
namespace App\Jobs;
use Log;
use Illuminate\Bus\Queueable;
use Illuminate\Console\Command;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;
use SwooleTW\Http\Websocket\Facades\Websocket;
class GenBarcodeJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct()
{
Log::info('coming');
}
public function handle()
{
Websocket::broadcast()->emit('starting',[]);
}
}
What did you expect to see?
I hope the websokct:emit () work in jobs
What did you see instead?
it can't work
The text was updated successfully, but these errors were encountered:
I wanna notify all online websocket user do something after the queue job finish;
I'm sure the queue job is worked,because the log is printed, and client was Connected;
but the all websocket client dose't received message from server
In a nutshell: Websocket::broadcast()->emit('starting',[]);
work in Controller,
inoperation in Queue Job GenBarcodeJob::dispatch();
Make sure you read Issues Guideline and answer these questions before submitting your issue. Thanks!
(Any non-English issues will be closed immediately.)
php -v
andphp --ri swoole
)I hope the websokct:emit () work in jobs
it can't work
The text was updated successfully, but these errors were encountered: