Skip to content

Commit 2292fcc

Browse files
Store cookies in per worker local file #193
1 parent 44bd756 commit 2292fcc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

classes/robot/crawler.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,12 @@ private static function determine_filesize($curlhandle, $method, $success, $body
10901090
public function scrape($url) {
10911091

10921092
global $CFG;
1093-
$cookiefilelocation = $CFG->dataroot . '/tool_crawler_cookies.txt';
1093+
1094+
static $cookiefilelocaion = '';
1095+
if (!$cookiefilelocation) {
1096+
$cookiefilelocation = make_request_directory() . '/tool_crawler_cookies.txt';
1097+
}
1098+
10941099
$config = self::get_config();
10951100

10961101
$version = moodle_major_version();

0 commit comments

Comments
 (0)