throw new RuntimeException('Telegram API error. Description: No response');
}
$result = json_decode($result, true);
if ($result['ok'] === false) {
throw new RuntimeException('Telegram API error. Description: ' . $result['description']);
}
}
/**
* Handle a message that is too long: truncates or splits into several
foreach ($messages as $key => $msg) {
if ($this->delayBetweenMessages && $key > 0) {
sleep(1);
}
$this->sendCurl($msg);
}
}
protected function sendCurl(string $message): void
{
$key = $this->keyGenerate($record);
if (false === $this->keyExist($key)) {
$this->firedMessages[$key] = $record;
Cache::add($key, $record, 120);
$this->send($record['formatted']);
}
}
private function keyExist(string $key): bool
{
$record = $this->processRecord($record);
}
$record['formatted'] = $this->getFormatter()->format($record);
$this->write($record);
return false === $this->bubble;
}
/**
}
}
// once the record exists, send it to all handlers as long as the bubbling chain is not interrupted
try {
if (true === $handler->handle($record)) {
break;
}
} catch (Throwable $e) {
$this->handleException($e, $record);
* @param string|Stringable $message The log message
* @param mixed[] $context The log context
*/
public function alert($message, array $context = []): void
{
$this->addRecord(static::ALERT, (string) $message, $context);
}
/**
* Adds a log record at the EMERGENCY level.
*
* @param array $parameters
* @return mixed
*/
public function __call(string $method, $parameters)
{
return $this->driver()->$method(...$parameters);
}
/**
* Create a new, on-demand aggregate logger instance.
*/
public static function __callStatic($method, $args)
{
if (!isset(self::$instance)) {
self::$instance= new LogManager();
}
return self::$instance->$method(...$args);
}
}
if ($end > 2) {
Log::alert('Mysql Time query', [
'query' => tep_db_input($query),
'time' => $end,
'SCRIPT_FILENAME' => $_SERVER["SCRIPT_FILENAME"],
]);
}
$query_total_time += $end;
$manufactures_info = array();
while ($manufactures = tep_db_fetch_array($manufactures_info_query)) {
array_push($manufactures_info, $manufactures);
}
tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$_GET['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
$product_info['products_price'] = tep_xppp_getproductprice($product_info['products_id']);
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
$query_special_prices_hide_result = SPECIAL_PRICES_HIDE;
RuntimeException
|
---|
RuntimeException: Telegram API error. Description: Too Many Requests: retry after 26 at /home/solomono/web/solomono.net/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php:256 at Monolog\Handler\TelegramBotHandler->sendCurl() (/home/solomono/web/solomono.net/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php:230) at Monolog\Handler\TelegramBotHandler->send() (/home/solomono/web/solomono.net/app/Classes/Logger/Handler/TelegramHandler.php:19) at App\Classes\Logger\Handler\TelegramHandler->write() (/home/solomono/web/solomono.net/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:48) at Monolog\Handler\AbstractProcessingHandler->handle() (/home/solomono/web/solomono.net/vendor/monolog/monolog/src/Monolog/Logger.php:399) at Monolog\Logger->addRecord() (/home/solomono/web/solomono.net/vendor/monolog/monolog/src/Monolog/Logger.php:676) at Monolog\Logger->alert() (/home/solomono/web/solomono.net/app/Classes/Logger/LogManager.php:92) at App\Classes\Logger\LogManager->__call() (/home/solomono/web/solomono.net/app/Classes/Logger/Log.php:17) at App\Classes\Logger\Log::__callStatic() (/home/solomono/web/solomono.net/includes/functions/database.php:93) at tep_db_query() (/home/solomono/web/solomono.net/product_info.php:39) |