Ideas for how to reset multithread projects in task manager?

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
So I have projects which multuthread by taking line from file then putting back if there is an error.

I make it repeat till x amount of successes and project finishes.

I want to run every 2 hours but the problem is on repeat runs often there are leftover lines from the old run so it messes up the new run.

I currently have it delete the old file if its empty and/or if no file copy account file master to temp.

So it wont do that if there are lines leftover.

So how can I make it delete if there are still leftovers? I am thinking i could setup global variable active thing agian but that is so complex to mess around with is tehre antoehr way around this issue? Was quite hard to exaplin so i can give more clarification if needed :-)
 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
Yes but how do you discern success because it can only create the file once all teamplates succeed not just one. So the root problem remains the same in how to make zenno know all projects are done.
 

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
no more suggestions?
 

Nick

Client
Регистрация
22.07.2014
Сообщения
1 963
Благодарностей
796
Баллы
113
Well, as suggested, use the delete.txt file and analyze its contents to see if all threads have done the job
 
  • Спасибо
Реакции: Harambulus

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
Well the first reply wasnt the whole sotry and your addition helps :-) I will try with a counter and logic check

or ill try without delete altogether and use count of lines.
 

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
Hmm this is so difficult i require more input/some fresh ideas :/.

I set up the template to that after every success it would +1 to success file.

So i have it that once it reaches the amount of succeses i specify then it will delete the temp accounts and recopy the master accounts file.

The problem is tho that the success file wont always register the correct amount probably due to it trying to write when its alreayd in use sometimes.

So often there will still be lines left of the temp accounts file when the new run starts so it would do those before going to the next whihci i dont want.

I want it to always copy the new batch over.

So then i think i can tell it to always delete file at the end of the run but the problem then is how to make zenno determine it is at the end of the run and not somehow delete the temp file while in the middle of the run when other threads are still using it?

How do I only make it delete the old one and write a new one on the first thread of the run?
 
Последнее редактирование:

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
If you use the same files with different threads or projects use it as list binded to file. Do not use file actions. This will help to avoid conflicts
 

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
How do you mean do not use file actions?

Also how do i use this bind to the file option? ive never used it before. i see i have to make a path but i get an error when i make up a path- it just says fail to process table- i made the path {-project.directory-}binded.txt? not sure what it does and dont see a wiki for it when googling so not sure what im supposed t obe doing.
 
Последнее редактирование:

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
How do you mean do not use file actions?

Also how do i use this bind to the file option? ive never used it before. i see i have to make a path but i get an error when i make up a path- it just says fail to process table- i made the path {-project.directory-}binded.txt? not sure what it does and dont see a wiki for it when googling so not sure what im supposed t obe doing.
In order to bind the list to a file, the file first needs to exist. Take the bad end from Bind to File and make it create the file with File Processing, then back to Bind to File again. This time it will succeed as it now exists.
The idea with binding the file is to make all threads synced, working with the same list and content within it without overlapping each other when saving/loading data from it.
http://zennolab.com/discussion/threads/how-to-keep-fresh-links-while-deleting-processed-ones.19409/#post-125733
 

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
I dont know what you mean about bad ends creating the file with file processing.

I am reading another thread you replied to which has helped a bit tho...http://zennolab.com/discussion/threads/bind-file-multithread-help.19052/#post-122874

I just messed around and saw it wokred when i bound the existing file.

This tings seems so obtuse, why isnt there a simple explanation of ti somewhere, i see reading old threads everyone has same issue not knowing what it does.

So i just tried to bind to the existing accounts file but i got an error when i try and take line after binding from that file.

So then i thought i should bind to a new file. Got error before the file existed, so i made the file and it worked to bind to file. But still when i try and take line from the new file binded.txt i sitll get error saying failed to process table...what am i missing? I am still guessing trying to fill in the dots since there is no explanation about what this thing does so gotta keep trial and erroring till i figure it out.
 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
PM me the project and I can take a look at it :-)
 
  • Спасибо
Реакции: rostonix

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
Bind to file is the same as setting path to file in list settings.
You can leave path empty in list settings and bind it to file within project anywhere you need
 

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
Unfortunately, this doesnt help since i never use path to file settings either...
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
then you don something wrong if you have conflicts. either you use Save action of File processing actions?
 

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
Ok so I turned off save to file and it no longer gave an error. Now let me debug and see if it does what i want :D
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
That's correct: if you use file in multithreads you should do this ONLY with lists binded to file and only List processing actions except List processing - Save to file (this action you can use if you wanna save data to different location)
 

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
Ok if I was using 'remove line after getting' before in file actions what should i do now instead? because it now binds to file but the original line isnt removed from the main file which they all take form, so subsequent thread will jsut take line 0 each time.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
'remove line after getting'
you can use this action
 

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
Thats what i am using but since i now have unticked the save changes to file so that bind to file would work the changes do not save to the original file which the other threads will be taking from?

Edit: i see i also had to untick load from file.
 
Последнее редактирование:

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
Also currently if there is an error then for bad end i have it write the line back using write text to put the line of the table back with ; for each. Do i have to change this now im using bind to file? to synch it with the bind to file command?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
When you use binding list/table with file you need to check load from file and save chnages in settings.
write text to put the line of the table back with ; for each.
What action do you use for this?
 

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
I'm using write text action for that.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
That's your error. You should use List/table processing - Add line
 
  • Спасибо
Реакции: Harambulus

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
  • Спасибо
Реакции: Harambulus

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
Ye i saw recently, ill try again with those/
 
Последнее редактирование:

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
Answer is above. You need to use Addline action
 

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
Ok the accounts seem to be tkaing more accurately now but sitll haivng an issue with the succes register. I have it bound to list and on success it will take form theis list read the number and use java to +1 then overwrite and delete empty lines.

But im sitll finding that often it will not add up correctly and be one short of the success count in poster.

I need to use it so i can tell the new threads when to delete the account file on a new run, rather than take line on current run. unless you guys have a better solution.
 

Harambulus

Client
Регистрация
16.09.2011
Сообщения
365
Благодарностей
10
Баллы
18
How can I stop more threads from running if I want to stop after X successes? Because say i make 50 tries total if i want 33 succeses to account for errrors.

I am doing take line and write back if fail with binding to file.

But what is happening is i find that looking back at the run when its near the end i see the accounts will have been deleted and the new account file copied over again, so it will someitmes be doing other ones twice.

Multithreading is so complicated to get it running smoothly :(
 

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