It's not clear to my how farm class works.
Firstly , method start create endless loop which call methods cycle and cleanup(right?)
Secondly , method cleanup save new empty score to file save(threads, [Score.new(host: host, port: port, invoice: @invoice, strength: @strength)]) (why do we need to save empty score ?) then we reject scores by threads names scores.reject { |s| @threads.exists?(s.to_mnemo) }(why do we need it ?) and finally we add new score to pipeline
Thirdly , method cycle we pop score from pipeline, assign score's name to thread name , and then we get new score using farmer farmer.up(s) and save this score to file.
The main incomprehensible part is cleanup . I didn't find any explanation in White Paper so please add more comments in source code or put your answer here.
Thanks in advance
@strogiyotec/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!
It's not clear to my how farm class works. Firstly , method start create endless loop which call methods cycle and cleanup(right?) Secondly , method
cleanup
save new empty score to filesave(threads, [Score.new(host: host, port: port, invoice: @invoice, strength: @strength)])
(why do we need to save empty score ?) then we reject scores by threads namesscores.reject { |s| @threads.exists?(s.to_mnemo) }
(why do we need it ?) and finally we add new score to pipeline Thirdly , methodcycle
we pop score from pipeline, assign score's name to thread name , and then we get new score using farmerfarmer.up(s)
and save this score to file. The main incomprehensible part is cleanup . I didn't find any explanation in White Paper so please add more comments in source code or put your answer here. Thanks in advance