Check-in [23227022b4]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Rebuild only users that have repositories
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 23227022b44c24dac2da4b27de07f545604b27e2
User & Date: rkeene 2020-08-24 21:02:25
Context
2020-08-24
21:03
Improve ACLs and logging on suid-fossil wrapper check-in: f4145e1a0c user: rkeene tags: trunk
21:02
Rebuild only users that have repositories check-in: 23227022b4 user: rkeene tags: trunk
20:51
Increase memory limit (RSS) to 512MiB check-in: 2910145ea1 user: rkeene tags: trunk
Changes

Changes to scripts/rebuild.php.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

include('include.php');

$sql = "SELECT * FROM users"; 
if ($result = Nano_Db::query($sql)) {
	foreach ($result as $user) {
		$username = $user['username'];
		echo "Processing User: {$username}\n";
		$fossil = new Nano_Fossil($user);
		$result = $fossil->rebuildAllRepos();
		if (!$result) {
			echo "Failed!\n";
		}
	}
}

?>




|













1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

include('include.php');

$sql = "SELECT username, id FROM users WHERE id IN (SELECT DISTINCT user_id AS id FROM repositories)"; 
if ($result = Nano_Db::query($sql)) {
	foreach ($result as $user) {
		$username = $user['username'];
		echo "Processing User: {$username}\n";
		$fossil = new Nano_Fossil($user);
		$result = $fossil->rebuildAllRepos();
		if (!$result) {
			echo "Failed!\n";
		}
	}
}

?>