Hi!
I have been developing a dosing automation for our Pioreactors, and have come up with some questions about software and plugins. Also, I tested my code last week and it did not work, so I would be super grateful if I could get more input into these topics to figure out how to write the code correctly.
-
Each worker has their own config_.ini file, is it normal that they are empty? and only the leader config file is not?
-
What is the most common way to run a customized dosing automation: as a one-time run, as a background job, have it as a plugin and run it from the CL, as a plugin run from the UI? Or how do I know which is the best way to run it for our setup?
-
To run my script as a background job, I found that I can use either of these next commands, but the nohup command preserves the output in a file. Is this correct? and are these the correct commands?
python your_script.py >/dev/null 2>&1 & disown
nohup python3 your_script.py &
-
How do you stop a background job? just shuting down the pioreactor? or some other way?
-
Can I restart the automation if it was already running?
I was checking the output file to see if the automation was running correctly, by writing cat nohup.out
, and the error messages were not clear to me. Sometimes it said that some input was missing (which was not the case), other times some syntax errors, which I corrected in the file directly in the CL and saved it, but it seemed like the pioreactor was trying to run some older version of the .py file instead of the latest one. Sometimes it said some errors mentioning “exiting”, so I did not know if the automation was already running and I had force it to start again and instead the initial run was just stopped.
- So would it be better to stop the background job and then restart it again? Or what is recommended here?
- Does the output file get overwritten every time the automation is run? or should i delete it so that a new version of it can be created?
At the moment I do not know how to correct my .py file so that the automation works correctly, since I dont really understand the last error messages I was getting in the nohup.out file. Would it be better to make a .yaml file and upload it to the UI as a plugin, so the errors can be handled easier? or that is not really the case? Thought maybe having it in the UI would make it easier to see if the automation is at least running, for example, or how it gives back the errors encountered.
Thank you very much for the help!