Simulation does not support plugins yet
This commit is contained in:
parent
68143ff916
commit
f1d7555ccc
@ -186,6 +186,7 @@ function newNotice($i, $tagmax)
|
|||||||
$notice = Notice::saveNew($user->id, $content, 'createsim', $options);
|
$notice = Notice::saveNew($user->id, $content, 'createsim', $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Plugins should be part of the simulation too!
|
||||||
function newMessage($i)
|
function newMessage($i)
|
||||||
{
|
{
|
||||||
global $userprefix;
|
global $userprefix;
|
||||||
@ -206,7 +207,7 @@ function newMessage($i)
|
|||||||
$other = $friends[$j];
|
$other = $friends[$j];
|
||||||
|
|
||||||
$message = Message::saveNew($user->id, $other->id, $content, 'createsim');
|
$message = Message::saveNew($user->id, $other->id, $content, 'createsim');
|
||||||
}
|
}*/
|
||||||
|
|
||||||
function newSub($i)
|
function newSub($i)
|
||||||
{
|
{
|
||||||
@ -345,7 +346,7 @@ function testNoticeContent()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//function main($usercount, $groupcount, $noticeavg, $subsavg, $joinsavg, $favesavg, $messageavg, $tagmax)
|
//function main($usercount, $groupcount, $noticeavg, $subsavg, $joinsavg, $favesavg, $messageavg, $tagmax)
|
||||||
function main($usercount, $groupcount, $noticeavg, $subsavg, $joinsavg, $messageavg, $tagmax)
|
function main($usercount, $groupcount, $noticeavg, $subsavg, $joinsavg, $tagmax)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
$config['site']['dupelimit'] = -1;
|
$config['site']['dupelimit'] = -1;
|
||||||
@ -374,7 +375,7 @@ function main($usercount, $groupcount, $noticeavg, $subsavg, $joinsavg, $message
|
|||||||
// # registrations + # notices + # subs
|
// # registrations + # notices + # subs
|
||||||
|
|
||||||
//$events = $usercount + $groupcount + ($usercount * ($noticeavg + $subsavg + $joinsavg + $favesavg + $messageavg));
|
//$events = $usercount + $groupcount + ($usercount * ($noticeavg + $subsavg + $joinsavg + $favesavg + $messageavg));
|
||||||
$events = $usercount + $groupcount + ($usercount * ($noticeavg + $subsavg + $joinsavg + $messageavg));
|
$events = $usercount + $groupcount + ($usercount * ($noticeavg + $subsavg + $joinsavg));
|
||||||
|
|
||||||
$events -= $preuser;
|
$events -= $preuser;
|
||||||
$events -= $pregroup;
|
$events -= $pregroup;
|
||||||
@ -385,9 +386,10 @@ function main($usercount, $groupcount, $noticeavg, $subsavg, $joinsavg, $message
|
|||||||
$st = $nt + ($usercount * $subsavg);
|
$st = $nt + ($usercount * $subsavg);
|
||||||
$jt = $st + ($usercount * $joinsavg);
|
$jt = $st + ($usercount * $joinsavg);
|
||||||
// $ft = $jt + ($usercount * $favesavg);
|
// $ft = $jt + ($usercount * $favesavg);
|
||||||
$mt = $ft + ($usercount * $messageavg);
|
// $mt = $ft + ($usercount * $messageavg);
|
||||||
|
|
||||||
printfv("$events events ($ut, $gt, $nt, $st, $jt, $ft, $mt)\n");
|
// printfv("$events events ($ut, $gt, $nt, $st, $jt, $ft, $mt)\n");
|
||||||
|
printfv("$events events ($ut, $gt, $nt, $st, $jt)\n");
|
||||||
|
|
||||||
for ($i = 0; $i < $events; $i++)
|
for ($i = 0; $i < $events; $i++)
|
||||||
{
|
{
|
||||||
@ -413,9 +415,9 @@ function main($usercount, $groupcount, $noticeavg, $subsavg, $joinsavg, $message
|
|||||||
/* } else if ($e > $jt && $e <= $ft) {
|
/* } else if ($e > $jt && $e <= $ft) {
|
||||||
printfv("$i Making a new fave\n");
|
printfv("$i Making a new fave\n");
|
||||||
newFave($n);*/
|
newFave($n);*/
|
||||||
} else if ($e > $ft && $e <= $mt) {
|
/* } else if ($e > $ft && $e <= $mt) {
|
||||||
printfv("$i Making a new message\n");
|
printfv("$i Making a new message\n");
|
||||||
newMessage($n);
|
newMessage($n);*/
|
||||||
} else {
|
} else {
|
||||||
printfv("No event for $i!");
|
printfv("No event for $i!");
|
||||||
}
|
}
|
||||||
@ -430,7 +432,7 @@ $noticeavg = (have_option('n', 'notices')) ? get_option_value('n', 'notices')
|
|||||||
$subsavg = (have_option('b', 'subscriptions')) ? get_option_value('b', 'subscriptions') : max($usercount/20, 10);
|
$subsavg = (have_option('b', 'subscriptions')) ? get_option_value('b', 'subscriptions') : max($usercount/20, 10);
|
||||||
$joinsavg = (have_option('j', 'joins')) ? get_option_value('j', 'joins') : 5;
|
$joinsavg = (have_option('j', 'joins')) ? get_option_value('j', 'joins') : 5;
|
||||||
//$favesavg = (have_option('f', 'faves')) ? get_option_value('f', 'faves') : max($noticeavg/10, 5);
|
//$favesavg = (have_option('f', 'faves')) ? get_option_value('f', 'faves') : max($noticeavg/10, 5);
|
||||||
$messageavg = (have_option('m', 'messages')) ? get_option_value('m', 'messages') : max($noticeavg/10, 5);
|
//$messageavg = (have_option('m', 'messages')) ? get_option_value('m', 'messages') : max($noticeavg/10, 5);
|
||||||
$tagmax = (have_option('t', 'tags')) ? get_option_value('t', 'tags') : 10000;
|
$tagmax = (have_option('t', 'tags')) ? get_option_value('t', 'tags') : 10000;
|
||||||
$userprefix = (have_option('x', 'prefix')) ? get_option_value('x', 'prefix') : 'testuser';
|
$userprefix = (have_option('x', 'prefix')) ? get_option_value('x', 'prefix') : 'testuser';
|
||||||
$groupprefix = (have_option('z', 'groupprefix')) ? get_option_value('z', 'groupprefix') : 'testgroup';
|
$groupprefix = (have_option('z', 'groupprefix')) ? get_option_value('z', 'groupprefix') : 'testgroup';
|
||||||
@ -448,7 +450,7 @@ if (is_readable($wordsfile)) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
//main($usercount, $groupcount, $noticeavg, $subsavg, $joinsavg, $favesavg, $messageavg, $tagmax);
|
//main($usercount, $groupcount, $noticeavg, $subsavg, $joinsavg, $favesavg, $messageavg, $tagmax);
|
||||||
main($usercount, $groupcount, $noticeavg, $subsavg, $joinsavg, $messageavg, $tagmax);
|
main($usercount, $groupcount, $noticeavg, $subsavg, $joinsavg, $tagmax);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
printfv("Got an exception: ".$e->getMessage());
|
printfv("Got an exception: ".$e->getMessage());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user