plugin thread controll

myndeswx

Client
Регистрация
15.05.2017
Сообщения
436
Благодарностей
104
Баллы
43
Hello, I believe it should be already discussed, but I can't find information on it anywhere, so this is the issue-
I have 1 main template that runs in 1 thread and in the end, it should run another template (a plugin?) But the other template / plugin should run in 20 threads
Any guidance on this topic is welcome, thank you!
 

myndeswx

Client
Регистрация
15.05.2017
Сообщения
436
Благодарностей
104
Баллы
43
Found a snippet on the forum
C#:
 string tempname = "Noice";
int tries = Int32.Parse (project.Variables ["tmp"]. Value); // number of executions

if (tries> 0) {
   ZennoPoster.SetMaxThreads (tempname, 10); // number of threads
   ZennoPoster.AddTries (tempname, tries);
   TaskHelper.WaitRun (project, tempname); // wait for all executions to complete
}
works well, only question is how to pass a variable now: am: [/ CODE]
 

nicanil

Client
Регистрация
06.03.2016
Сообщения
2 242
Благодарностей
1 820
Баллы
113
You can create .bat file to run template: make right-click on project,choose options and save the file
76082

Then at the end of your main template add action Custom code=>Run the program and choose created .bat file as the Executable.
 
Последнее редактирование:
  • Спасибо
Реакции: myndeswx

myndeswx

Client
Регистрация
15.05.2017
Сообщения
436
Благодарностей
104
Баллы
43
You can create .bat file to run template: make right-click on project, choose options and save the file
[SPOILER = "Screenshot"] Посмотреть вложение 76082[/ SPOILER]

Then at the end of your main template add action Custom code => Run the program and choose created .bat file as the Executable.
Thank you! I have actually found out that you can use global variables for it, but it can get messy in multithreading.
And your example would actually work, but how to use the "input settings" from your screenshot? I suppose you can set variables there but couldn't find any example of the formating
 

nicanil

Client
Регистрация
06.03.2016
Сообщения
2 242
Благодарностей
1 820
Баллы
113
If your template has Input Settings you can export these settings to a file.
76084

And then, while creating .bat file, you can set path to the file with the exported settings.
 
  • Спасибо
Реакции: myndeswx

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