Resque: enqueue stores data in the redis queue, and the json_decode obtained by the worker is sometimes incomplete (the probability of a high access volume may be higher, not fully verified )! Very depressing. I read a lot of php-ressue code, which is also very clear. I can't see any problems. In php-ressue... Resque: enqueue stores the data in the redis queue, and the worker obtains the json_decode, which is sometimes incomplete (the probability may be higher when the traffic is large, but it is not fully verified )!
Very depressing. I read a lot of php-ressue code, which is also very clear. I can't see any problems. Log in php-ressue as follows (Rescue. php ),
public static function pop($queue) { $item = self::redis()->lpop('queue:' . $queue); if(!$item) { return; } $result = json_decode($item, true); if(!is_array($result)) error_log('why not array : ' . $item); return $result; }
The php log appears several times in a day. The $ item output is not a valid json
Which of the following has experience? How do I provide suggestions?
Reply content:
Resque: enqueue stores data in the redis queue, and the json_decode obtained by the worker is sometimes incomplete (the probability of a high access volume may be higher, not fully verified )!
Very depressing. I read a lot of php-ressue code, which is also very clear. I can't see any problems. Log in php-ressue as follows (Rescue. php ),
public static function pop($queue) { $item = self::redis()->lpop('queue:' . $queue); if(!$item) { return; } $result = json_decode($item, true); if(!is_array($result)) error_log('why not array : ' . $item); return $result; }
The php log appears several times in a day. The $ item output is not a valid json
Which of the following has experience? How do I provide suggestions?