1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-24 00:53:10 +02:00

fix: remove unnecessary calls to purgeCache (#3502)

This commit is contained in:
Dag
2023-07-06 18:52:19 +02:00
committed by GitHub
parent 965d7d44c5
commit 5e22459eb6
7 changed files with 22 additions and 19 deletions

View File

@@ -48,7 +48,7 @@ class EZTVBridge extends BridgeAbstract
public function collectData()
{
$eztv_uri = $this->getEztvUri();
Debug::log($eztv_uri);
Logger::debug($eztv_uri);
$ids = explode(',', trim($this->getInput('ids')));
foreach ($ids as $id) {
$data = json_decode(getContents(sprintf('%s/api/get-torrents?imdb_id=%s', $eztv_uri, $id)));

View File

@@ -223,10 +223,10 @@ EOD;
CURLOPT_POSTFIELDS => json_encode($request)
];
Debug::log("Sending GraphQL query:\n" . $query);
Debug::log("Sending GraphQL variables:\n" . json_encode($variables, JSON_PRETTY_PRINT));
Logger::debug("Sending GraphQL query:\n" . $query);
Logger::debug("Sending GraphQL variables:\n" . json_encode($variables, JSON_PRETTY_PRINT));
$response = json_decode(getContents('https://gql.twitch.tv/gql', $header, $opts));
Debug::log("Got GraphQL response:\n" . json_encode($response, JSON_PRETTY_PRINT));
Logger::debug("Got GraphQL response:\n" . json_encode($response, JSON_PRETTY_PRINT));
if (isset($response->errors)) {
$messages = array_column($response->errors, 'message');

View File

@@ -228,6 +228,7 @@ EOD
$cache->setScope('twitter');
$cache->setKey(['cache']);
// todo: inspect mtime instead of purging with 3h
$cache->purgeCache(60 * 60 * 3);
$api = new TwitterClient($cache);