mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
parent
6540946c85
commit
3fe8570726
@ -6,6 +6,7 @@
|
|||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Release v2.1.5-2023.09 🎉
|
- Release v2.1.5-2023.09 🎉
|
||||||
|
- Minor improvements [\#235](https://github.com/torrentpier/torrentpier-lts/pull/235) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
|
|
||||||
## [v2.1.5-2023.08](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.08) (2023-09-04)
|
## [v2.1.5-2023.08](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.08) (2023-09-04)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.07...v2.1.5-2023.08)
|
[Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.07...v2.1.5-2023.08)
|
||||||
|
@ -239,7 +239,7 @@ else
|
|||||||
|
|
||||||
if (empty($row['topic_id']))
|
if (empty($row['topic_id']))
|
||||||
{
|
{
|
||||||
msg_die('Torrent not registered, info_hash = ' . bin2hex($info_hash_sql));
|
msg_die('Torrent not registered, info_hash = ' . bin2hex($info_hash));
|
||||||
}
|
}
|
||||||
if (empty($row['user_id']))
|
if (empty($row['user_id']))
|
||||||
{
|
{
|
||||||
@ -487,16 +487,16 @@ if (!$output)
|
|||||||
LIMIT 1
|
LIMIT 1
|
||||||
");
|
");
|
||||||
|
|
||||||
$seeders = $row['seeders'];
|
$seeders = isset($row['seeders']) ? $row['seeders'] : 0;
|
||||||
$leechers = $row['leechers'];
|
$leechers = isset($row['leechers']) ? $row['leechers'] : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = array(
|
$output = array(
|
||||||
'interval' => (int) $announce_interval,
|
'interval' => (int) $announce_interval,
|
||||||
'min interval' => (int) $announce_interval,
|
'min interval' => (int) $announce_interval,
|
||||||
'peers' => $peers,
|
|
||||||
'complete' => (int) $seeders,
|
'complete' => (int) $seeders,
|
||||||
'incomplete' => (int) $leechers,
|
'incomplete' => (int) $leechers,
|
||||||
|
'peers' => $peers,
|
||||||
);
|
);
|
||||||
|
|
||||||
$peers_list_cached = CACHE('tr_cache')->set(PEERS_LIST_PREFIX . $topic_id, $output, PEERS_LIST_EXPIRE);
|
$peers_list_cached = CACHE('tr_cache')->set(PEERS_LIST_PREFIX . $topic_id, $output, PEERS_LIST_EXPIRE);
|
||||||
|
@ -61,6 +61,7 @@ $bb_cfg['cache']['memcache'] = array(
|
|||||||
$bb_cfg['cache']['redis'] = array(
|
$bb_cfg['cache']['redis'] = array(
|
||||||
'host' => '127.0.0.1',
|
'host' => '127.0.0.1',
|
||||||
'port' => 6379,
|
'port' => 6379,
|
||||||
|
'pconnect' => true,
|
||||||
'con_required' => true,
|
'con_required' => true,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
4
library/includes/cache/redis.php
vendored
4
library/includes/cache/redis.php
vendored
@ -26,10 +26,12 @@ class cache_redis extends cache_common
|
|||||||
|
|
||||||
function connect ()
|
function connect ()
|
||||||
{
|
{
|
||||||
|
$connect_type = ($this->cfg['pconnect']) ? 'pconnect' : 'connect';
|
||||||
|
|
||||||
$this->cur_query = 'connect '. $this->cfg['host'] .':'. $this->cfg['port'];
|
$this->cur_query = 'connect '. $this->cfg['host'] .':'. $this->cfg['port'];
|
||||||
$this->debug('start');
|
$this->debug('start');
|
||||||
|
|
||||||
if (@$this->redis->connect($this->cfg['host'], $this->cfg['port']))
|
if (@$this->redis->$connect_type($this->cfg['host'], $this->cfg['port']))
|
||||||
{
|
{
|
||||||
$this->connected = true;
|
$this->connected = true;
|
||||||
}
|
}
|
||||||
|
@ -25,10 +25,12 @@ class datastore_redis extends datastore_common
|
|||||||
|
|
||||||
function connect ()
|
function connect ()
|
||||||
{
|
{
|
||||||
|
$connect_type = ($this->cfg['pconnect']) ? 'pconnect' : 'connect';
|
||||||
|
|
||||||
$this->cur_query = 'connect '. $this->cfg['host'] .':'. $this->cfg['port'];
|
$this->cur_query = 'connect '. $this->cfg['host'] .':'. $this->cfg['port'];
|
||||||
$this->debug('start');
|
$this->debug('start');
|
||||||
|
|
||||||
if (@$this->redis->connect($this->cfg['host'],$this->cfg['port']))
|
if (@$this->redis->$connect_type($this->cfg['host'], $this->cfg['port']))
|
||||||
{
|
{
|
||||||
$this->connected = true;
|
$this->connected = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user