After executing ./yii queue/listen, I modified the job class and the code took effect directly. Doesn’t it need to be restarted to take effect?
class OfferQueryJob extends BaseObject implements JobInterface, RetryableJobInterface
{
public function execute($queue)
{
// Yii::$app, isn’t it resident memory? spl_object_has(Yii::$app), the result of each message is different.
echo spl_object_has(Yii::$app), "\n";
}
}