Load file from the network on several Zennos running. Possible?

V Munich

Пользователь
Регистрация
20.02.2014
Сообщения
85
Благодарностей
3
Баллы
8
Hello,

I'm having a hard time finding a way to use several servers with Zenno installed, all getting data from the same place.

What my template on server does is:

Query the MYSQL and get a table with all accounts that have status = '0'
Do some automation on those accounts
When finished, set the status = '1' on the account.

I had problem making Zenno connect to a remote MySQL server, so I made a PHP script that queries the DB and downloads a .csv file to the same directory as Zenno.

The problem is, I want to use several servers. So I thought about having a shared folder on my network with a simple .csv file, with all my accounts. Then, have all the servers load the .csv from this location.

Is this pratical?
Is there a better way to have several Zenno boxes working together, without collisions?

I have the option "Remove after getting" enabled on my template.
 

V Munich

Пользователь
Регистрация
20.02.2014
Сообщения
85
Благодарностей
3
Баллы
8
Ok I figured out a better way. I made a PHP API that gets a random row that has status = 0 and prints its information in XML format. Then I use GET requests in my template on Zenno to get a random row using this PHP script and put it on a variable. Later, I use regex to scrape each column from the earlier variable and put them on their respective variables. After Zenno finish running the template, it sets status = 1 on the row it just grabbed, so other threads won't touch this row again. This way I can have several servers running with no problem, the only problem is that now I have more load on my mysql server but that's okay since it's easy to solve :P

I'm happy, no more .CSVs :ar:
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)