for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Basis\Job\Tarantool;
use Tarantool\Client;
use Tarantool\Schema\Index;
class Clear
{
public function run(Client $client)
$schema = $client->getSpace('_vspace');
$response = $schema->select([], Index::SPACE_NAME);
$data = $response->getData();
foreach ($data as $row) {
if ($row[1] == 0) {
// user space
$client->evaluate('box.space.'.$row[2].':drop{}');
}