Author Topic: Nutcracker: New command to rebuild gallery on local installs  (Read 6009 times)

Offline smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder


QUESTION?
Can I copy this database on a local network.

yes, you can do anything you want to the local database

After installing the new program what file should I copy from one machine to another?

If you are setting up a second machine, i would follow steps one to seven. Now you have two local install son two machines. If you have modified data on the first local machine then run phpmyadmin and do an export of the nutcracker schema. read how to do export/import.

Will there be a way to update this database from effects generated on the web?
Not yet. That is coming with the new nutcracker. The only thing you can do is replace the local database with a new copy from nutcracker123.com

Is this the same as the menu command?
You are not allowed to view links. Register or Login

Rebuild the gallery is two steps.
1)http://localhost/nutcracker/effects/generate_gallery_gifs.php
This goes through every users effects by querying the database., It then looks to see if that user has the animated gif in their ../effects/workspaces/{member_id} directory. If yes, you see a GREEN "ok",if not it calls the appropriate effect code and u see a PURPLE "rebuilding".
This process will take hours

2) You are not allowed to view links. Register or Login. The purpose of this command is to walk through all the animated gifs and make sure therre is an entry in the GALLERY table in the database. When you go to the Gallery from the menu, it queries the GALLERY database.



thanks
Sean
Littleton, CO
Latest releases You are not allowed to view links. Register or Login
xLights/Nutcracker Forum You are not allowed to view links. Register or Login
Fbook You are not allowed to view links. Register or Login

Offline Danbe

  • Sr. Member
  • ****
  • Posts: 119
In 1 1/2 hours I have  1,869 Files, 8 Folders and still downloading Everything going good my side >.d9 >.d9 >.d9 >.d9

Offline mrduncan

  • Jr. Member
  • **
  • Posts: 13
Sean,

From your thread below:

"Remember when you are all done to run
You are not allowed to view links. Register or Login.
So that the newly created gifs can be added into the database.
Now you can go view (and copy) effects that you see in your local install."

I stop the download program after 23 hours of running with 75 new folders and 17K new files.

I see all the individual folders and animated GIF's.  What does "create_gallery.php" do?  And, what does "add to database mean"?

CORRECTION:  I now see what the "create_gallery.php" does.  That is to cool!!!!!!  Gallery now has 3812 GIFs.
« Last Edit: February 02, 2013, by mrduncan »

Offline MrChristmas2000

  • Sr. Member
  • ****
  • Posts: 1115
I am at 24hours..

Any idea how much longer this is going to take.

I am running this on a i7 quad core processor.

Offline kgustafson

  • Coop Manager
  • Sr. Member
  • *
  • Posts: 1120
    • Lost Weekend Productions
You are not allowed to view links. Register or Login
Sean,

From your thread below:

"Remember when you are all done to run
You are not allowed to view links. Register or Login.
So that the newly created gifs can be added into the database.
Now you can go view (and copy) effects that you see in your local install."

I stop the download program after 23 hours of running with 75 new folders and 17K new files.

I see all the individual folders and animated GIF's.  What does "create_gallery.php" do?  And, what does "add to database mean"?

CORRECTION:  I now see what the "create_gallery.php" does.  That is to cool!!!!!!  Gallery now has 3812 GIFs.

And to clarify, create_gallery.php 'walks' through your local installed animated gifs and sets up entries in the database table that gallery uses to generate the gallery itself.  This command actually looks at all files under your effects/workspaces directory to do this (thus why you want to run the generated command first, to generate the actual animated gifs.)  Another thing to do is that when you have created a bunch of new effects--which, in turn,  generates new animated gifs--is to run the create_gallery command again to make these newly created effects show up in the gallery.

Kurt
------
Visit at: You are not allowed to view links. Register or Login

Offline MrChristmas2000

  • Sr. Member
  • ****
  • Posts: 1115
I had a interesting thing happen.

The power cord got pulled out of my notebook that I started doing the following:

Admin > ;Generate the effects gallery on your local installed nutcracker' command

When I brought it out of standby I did a screen refresh of the webpage and it began executing the following command:

You are not allowed to view links. Register or Login

The cursor has stopped indicating that anything is running on the page and no further activity has appeared in the last 10 minutes or so.

Since there has been no completed message I am making the assumption that the command has completed.

I will now run the following as explained earlier.

You are not allowed to view links. Register or Login.

I will post if I have any problems.

Offline Danbe

  • Sr. Member
  • ****
  • Posts: 119
You are not allowed to view links. Register or Login
I had a interesting thing happen.

The power cord got pulled out of my notebook that I started doing the following:

Admin > ;Generate the effects gallery on your local installed nutcracker' command

When I brought it out of standby I did a screen refresh of the webpage and it began executing the following command:

You are not allowed to view links. Register or Login

The cursor has stopped indicating that anything is running on the page and no further activity has appeared in the last 10 minutes or so.

Since there has been no completed message I am making the assumption that the command has completed.

I will now run the following as explained earlier.

You are not allowed to view links. Register or Login.

I will post if I have any problems.


Same here everything stop about 10 15 minute ago

Offline smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder
You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login
I had a interesting thing happen.

The power cord got pulled out of my notebook that I started doing the following:

Admin > ;Generate the effects gallery on your local installed nutcracker' command

When I brought it out of standby I did a screen refresh of the webpage and it began executing the following command:

You are not allowed to view links. Register or Login

The cursor has stopped indicating that anything is running on the page and no further activity has appeared in the last 10 minutes or so.

Since there has been no completed message I am making the assumption that the command has completed.

I will now run the following as explained earlier.

You are not allowed to view links. Register or Login.

I will post if I have any problems.


Same here everything stop about 10 15 minute ago

if you do not use "End of program", it ha snot finished going through all users.

Understand what this program is doing. It is going though a 1000 users and for each calling multiple  effects. Sionce nutcracker is a web based operation, we need to suppress all the prompts that poccur when u use it normally.

so we setup a batch mode. pass in all parameters as if you had filled ina  form, now it runs through the effect. If any effect abrubtly dies, the program is done and the cursor prompt will change back to normal.

If i every see the busy icon of the cursor go back to normal, i just reload the page. i think i had to do this 3 or 5 times. I did go through and fix many of these dies. This is why you see almost every effect had been modified in this release.

The issue is 7000 effects have a small percentage with very bad data. Alpha fields in numbers, frame timing (sb 25-100) having values like 0.01 .etc.
In the next major release , we will improve data validation of all prompts. So why were these problems never raised before. I think if someones effect didnt work, they just recreated another, it works and they used that one.

So , in summary, if you dont see "End of Program" do a shift reload. You will now see lots of GREE "ok" until you reach where you left off. Then you start to see thre purple"rebuilding".


Be aware , there is one effect that loops forever. The user is Greg in Canby, member_id=215.

When i did a run, i let the process go overnight. I stopped the browser the next day and did a reload. It then skipped the file it was on. I later went back and looked at ../effects/workspaces/215 and found a 420gb file!.

I have gone and logged in to his account. he only has a few effects. one f them is a spiral that is causing the issue. I see no issue with his data but it does get into a loop. I still have to debug why, one effect out of 7000 has this issue.

for now, if your screen is not advancing at least one "rebuilding" every 5 minutes. stop the browser and reload it. Remember that i skip the last effect you were stuck on.
Remember that i originally said it would take 48 hours to rebuild. I did some things that havd dropped this to more like 12-18 hours. But ... therecan be two things that can happen

1) An effect that you are running exits with a die(message) command. Remember in batch mode you dont see all the exhoes , prints and dies
2) You hit an effect that loops

In both cases, stop teh browser and reload is the fix.


thanks
sean


Sean
Littleton, CO
Latest releases You are not allowed to view links. Register or Login
xLights/Nutcracker Forum You are not allowed to view links. Register or Login
Fbook You are not allowed to view links. Register or Login

Offline caretaker

  • Sr. Member
  • ****
  • Posts: 1770
I can verify that the command works correctly as I went through about 18 hours of rebuilding till I noticed my hard drive had filled.... <fp.  So after I get a new drive I will try again. As a note to others, make sure you have at least 100gigs of free space before you try this. 
Jeff Squires
You are not allowed to view links. Register or Login

Offline smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder
You are not allowed to view links. Register or Login
I can verify that the command works correctly as I went through about 18 hours of rebuilding till I noticed my hard drive had filled.... <fp.  So after I get a new drive I will try again. As a note to others, make sure you have at least 100gigs of free space before you try this.
Quote from: Xenia;258251
I found two files that were the problem.

Folder 209 file: M16_50~2_d_2.dat 109GB
Folder 215 File: M16_50~2_d_2.dat 306GB

7000 effects should take about 3gigbytes.

There is one bad effect that exists in 3 different accounts.

Here is the easiest way to fix this.

go to "localhost" not "localhost/nutcracker"

You should now be on the splash page of either wamp or xampp. You want to find MyPhpAdmin and click on it to run it.

On the left side you will see all the mysql databases.

left click on the database "nutcracker(24)"

Now you are able to execute queries against these databases.

So click on the second tab that says "SQL" and paste this query

delete FROM `effects_user_hdr` WHERE effect_name='2' and effect_class='spirals'

click go to execute it.

It should say 3 rows deleted


 delete any files from
../effects/workspaces/209/*.dat
../effects/workspaces/215/*.dat

Now go through the rebuild process.


This is why i was going to hold off on the gallery rebuild, it has lots of parts to it.

let me know if you got to "End of Program". Total disk space for the gallery should be < 4 gigabytes.

thanks
Sean
Littleton, CO
Latest releases You are not allowed to view links. Register or Login
xLights/Nutcracker Forum You are not allowed to view links. Register or Login
Fbook You are not allowed to view links. Register or Login

Offline MrChristmas2000

  • Sr. Member
  • ****
  • Posts: 1115
Well I wanted to do it on my notebook but I ran out of disk space on C: so I am going to see if I can do it on drive D: but it only has 270GB available on it and drive C: had 247GB free.

Oh well I guess it just takes up too much space to do it locally. :(

« Last Edit: February 03, 2013, by MrChristmas2000 »

Offline kgustafson

  • Coop Manager
  • Sr. Member
  • *
  • Posts: 1120
    • Lost Weekend Productions
You are not allowed to view links. Register or Login
Well I wanted to do it on my notebook but I ran out of disk space on C: so I am going to see if I can do it on drive D: but it only has 270GB available on it and drive C: had 247GB free.

Oh well I guess it just takes up too much space to do it locally. :(



Are you sure that isn't enough space?!  Or are you meaning MBs and not GBs?  270GB or 247GB should be plenty.

Kurt
------
Visit at: You are not allowed to view links. Register or Login

Offline MrChristmas2000

  • Sr. Member
  • ****
  • Posts: 1115
My notebook has 2 500GB drives totally 1TB. C: and D:

I will try the 'fix' from Shawn to see if that solves the problem later on.

Offline jnealand

  • Patron Member
  • Sr. Member
  • ****
  • Posts: 2494
Seems to me the simple solution is work on my physical builds and wait until version 2 is ready.  I definitely will not be working on sequencing for a couple of months.
Jim Nealand
Kennesaw, GA

Offline smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder
For those who are having a hard time rebuilding the gallery. I have copied all the effects into a 7zip file
You are not allowed to view links. Register or Login



unzip them to C:\xampp\htdocs\nutcracker\effects\workspaces\ if you have xampp and to C:\wamp\www\nutcracker\effects\workspaces\ if you have wamp


be sure to run You are not allowed to view links. Register or Login after you have unzipped this file. You need to generate entries in your local database for these new files.

thanks
sean
Sean
Littleton, CO
Latest releases You are not allowed to view links. Register or Login
xLights/Nutcracker Forum You are not allowed to view links. Register or Login
Fbook You are not allowed to view links. Register or Login