Page 1 of 1
Send yo mysql
Posted: Sun Feb 20, 2022 10:16 am
by taurojo
I like save the history convert to.external MySQL.
Any workflow for that?
I can send data to create API in PHP and save to mysql. Ir Python script to my Server MySQL update script.
Any sugestiĆ³n?
Re: Send yo mysql
Posted: Mon Feb 21, 2022 3:22 pm
by emcodem
Hi taurojo,
sure, there are many ways to do that.
One is to do a while (true) loop in a powershell script that asks the history api:
http://localhost:65445/api/v2/history/? ... &count=250 then parses the resulting JSON and inserts the data into your mysql. This will require lots of scripting work, alone parsing json is a nightmare in Powershell.
Another one is to prepare one commandline processor that you insert the data into mysql at the end of your workflow.
Another one is to use the http processor to call your php site and send the relevant data on job success or fail. You would also add the needed processor in each and every workflow at the correct spots. Use Processor Presets to make your life easy.
Yet another one is to read the monitor log file and transform/insert the data accordingly (but i would not recommend this, the monitor log can change or dissapear at any next release, e.g. ffastrans might hopefully change from files to database, then all files are gone!)