Home > Metadot Versions > Loopy
login

© Metadot Corporation

Loopy  

ABOUT LOOPY

Loopy is a utility that reports problems regarding Metadot 6.x instance table integrity problem, namely problems in parent-childs relationships and orphans.

HOW DO I KNOW I NEED LOOPY

Loopy fixes infinite loops occurring in Metadot 6. For example if a search query takes a long tine, feels up memory and make your server swap and crash then you probably need Loopy.

PREREQUISITES

Loopy is a Ruby script that needs the following applications and librairies:

  • Ruby
  • Rubygems
  • ActiveRecord (ruby gem)

INSTALLATION

  • Copy the files into any directory on any system (even a remote system).
  • Configure the loopy-database.yml
  • !!!! Make a backup of your database (very important) !!!!
  • Run:

$ ruby loopy.rb

This can take several minutes on large Metadot sites.

HOW TO HANDLE LOOPY OUTPUT

For loops:

  • In Metadot while logged as admin, create a new page (possibily in manage > toolbox) and write down the iid of this new page.
  • For each loop execute the folowing SQL statement:

$mysql> update instance set parentiid=<newpageiid> where iid=<looping_iid>

<newpageiid> : the new page iid (the one you just created)

<looping_iid> : the iid given by the loopy outpout.

This will move the gizmo (page, file, etc...) to the new page you created. You can actual reload the toolbox new page and see the items there.

 

For orphans:

Same as for loop except that you replace the looping iid by the orphan iid in the SQL query.

=> When this is done, run Loopy another time and make sure there is no problem anymore.

 

Good luck.