Questions about multithreads

cesario678

Client
Регистрация
10.03.2022
Сообщения
110
Благодарностей
9
Баллы
18
Hey guys, I have a question. I created a bot to perform some repetitive functions, and it works fine with a single thread. However, when I run the bot with multiple threads, I encounter some problems because I need it to read and delete the URL at the beginning of the bot, but the URL doesn't always load. This results in an error throughout the bot because it is left without the URL in the list.

The bot is supposed to run several different URLs in specific quantities, for example, it will run 10 different URLs and 6 times for each one, and then it stops.
In the single thread bot, it only deletes the URL it is using at the end. But in the multi-thread bot, this doesn't work because it needs to delete the URL at the beginning of the bot.

My question is, is there a way to solve this? And can I make the multi-thread bot not delete the URLs at the beginning but only after it finishes the function it needs to perform?
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
Hi.
Take URL with a deletion at the beginning.
If any error occurs, just add url back to the list.
There is bad end action in the Logic section. It will be executed if any error happens. Just connect add line to list action to this bad end and url will be added back to the list.

And add one and that save URL in list 6 times so bot will run it 6 times
 

cesario678

Client
Регистрация
10.03.2022
Сообщения
110
Благодарностей
9
Баллы
18
"Thank you for your help.
I didn't quite understand, sorry.
So, if I put a "read URL" option and next to it a "logic" option, if there is an error, does it go back to the option of adding the URL back to the file?"
 

cesario678

Client
Регистрация
10.03.2022
Сообщения
110
Благодарностей
9
Баллы
18
Hi.
Take URL with a deletion at the beginning.
If any error occurs, just add url back to the list.
There is bad end action in the Logic section. It will be executed if any error happens. Just connect add line to list action to this bad end and url will be added back to the list.

And add one and that save URL in list 6 times so bot will run it 6 times
"Thank you for your help.
I didn't quite understand, sorry.
So, if I put a "read URL" option and next to it a "logic" option, if there is an error, does it go back to the option of adding the URL back to the file?"
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
You use lists for taking urls from file right?
Then take line and thick checkbox delete line. So this will make sure your next thread is not taking the same urls again.

There is action bad End. located at Logic ==> Bad end. - Any action connected d there will be executed if the template ends with any error. So you add action list processing ==> Ad line to list. This will fix your issue when URL does not load. It will be added back to list and will execute again.
 
  • Спасибо
Реакции: cesario678

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
524
Благодарностей
112
Баллы
43
Your project must have a list/table linked to a file and first action of the project must take a line and delete line after take.

You must check both checkbox:
105531
 
  • Спасибо
Реакции: cesario678

cesario678

Client
Регистрация
10.03.2022
Сообщения
110
Благодарностей
9
Баллы
18
You use lists for taking urls from file right?
Then take line and thick checkbox delete line. So this will make sure your next thread is not taking the same urls again.

There is action bad End. located at Logic ==> Bad end. - Any action connected d there will be executed if the template ends with any error. So you add action list processing ==> Ad line to list. This will fix your issue when URL does not load. It will be added back to list and will execute again.
Thanks
 

cesario678

Client
Регистрация
10.03.2022
Сообщения
110
Благодарностей
9
Баллы
18

cesario678

Client
Регистрация
10.03.2022
Сообщения
110
Благодарностей
9
Баллы
18
You use lists for taking urls from file right?
Then take line and thick checkbox delete line. So this will make sure your next thread is not taking the same urls again.

There is action bad End. located at Logic ==> Bad end. - Any action connected d there will be executed if the template ends with any error. So you add action list processing ==> Ad line to list. This will fix your issue when URL does not load. It will be added back to list and will execute again.
Can you check for me if it's correct, just like in the image?

I added the (bad end) together with the function, but whenever there's an error in the bot, it doesn't go to (badend). So I added it there, it reads the URL, and if there's any error, it goes to the function of playing the link again on the list, which is the URL file."

 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
Bad end works just once. And it works whatever error is thrown.
You don't loop anything after bad end. You just finish, add url back to file and let other threads take care of repeating.
 

cesario678

Client
Регистрация
10.03.2022
Сообщения
110
Благодарностей
9
Баллы
18
Bad end works just once. And it works whatever error is thrown.
You don't loop anything after bad end. You just finish, add url back to file and let other threads take care of repeating.
"I apologize for not understanding you 100%, I don't speak any English and I'm using a translator to communicate.

So, are you saying that I should put the "bad end" without connecting it to anything, and connect the "load url" error to the "add line" list? Will that work?"
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
You should try different ways and test and see how this works, man. :-)
If any error happens Bad End will be executed. So you connect any actions to it you want gets executed after any error on the template.

105611
 
  • Спасибо
Реакции: cesario678

cesario678

Client
Регистрация
10.03.2022
Сообщения
110
Благодарностей
9
Баллы
18
Você deve tentar maneiras diferentes e testar e ver como isso funciona, cara.:-)
Se algum erro acontecer Bad End será executado. Assim, você conecta todas as ações que deseja que sejam executadas após qualquer erro no modelo.

Посмотреть вложение 105611
[/CITAR]
“Então, estou testando bastante. Como usei outros programas e eles funcionam de forma diferente, estou me confundindo com algumas coisas.

Fiz como você mencionou antes, mas sempre que dava um erro no bot, dentro do project maker zennoposter não ia para o lado ruim. Isso é normal? Apenas no símbolo azul zennoposter ele corrige isso?

Outra dúvida, se eu quiser terminar depois de um erro, mas executar 3 funções antes de terminar. Acabei de criar esse quadrado com 3 funções diferentes? Como esta imagem que você me enviou (adicionar url de volta à lista) Acabei de colar as funções abaixo dela? Será que o fim ruim os executará?"
 

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