Skip to content

Instantly share code, notes, and snippets.

@jraddaoui
Created February 25, 2020 21:16
Show Gist options
  • Save jraddaoui/c381028cde395792ef627263faf8e99c to your computer and use it in GitHub Desktop.
Save jraddaoui/c381028cde395792ef627263faf8e99c to your computer and use it in GitHub Desktop.
Simple script to create an IO with 20000 children ... `php symfony tools:run 20000_children.php`
<?php
$parent = new QubitInformationObject;
$parent->parentId = QubitInformationObject::ROOT_ID;
$parent->identifier = "A";
$parent->indexOnSave = false;
$parent->save();
for ($i = 0; $i < 20000; $i++)
{
print(".");
$desc = new QubitInformationObject;
$desc->parentId = $parent->id;
$desc->identifier = $i + 1;
$desc->indexOnSave = false;
$desc->save();
}
print($parent->slug);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment