Skip to content

Commit

Permalink
Store cookies in per worker local file #193
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanheywood committed Feb 4, 2025
1 parent 42e61ce commit cd96d14
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion classes/robot/crawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,12 @@ private static function determine_filesize($curlhandle, $method, $success, $body
public function scrape($url) {

global $CFG;
$cookiefilelocation = $CFG->dataroot . '/tool_crawler_cookies.txt';

static $cookiefilelocaion = '';
if (!$cookiefilelocation) {
$cookiefilelocation = make_request_directory() . '/tool_crawler_cookies.txt';
}

$config = self::get_config();

$version = moodle_major_version();
Expand Down

0 comments on commit cd96d14

Please sign in to comment.