Started getting loads of SQL Logger errors

Posted on
Sun Sep 08, 2019 2:10 pm
kw123 offline
User avatar
Posts: 6504
Joined: May 12, 2013
Location: Dallas, TX

Re: Started getting loads of SQL Logger errors

this seems to do the trick: stop indigo (server and client) wait x secs; relaunch indigo server then client


put this into an "action group/ server/ execute script"
Code: Select all
import os
#####
# script to stop and relauch indigo w a wait fo 30 seconds... usefull if you have an postgres resync issue.
# replace your userid home dir and indigo V#  min 7.3
# OSX does not offer to print msecs in bash, set to 000 to keep indigo format
#####
indigoV       = "7.3"
logFile       = "/Library/Application Support/Perceptive Automation/Indigo "+ indigoV +"/Logs/indigo_log.txt"
home          = "/users/karlwachs"
waitBfRelaunch  = "30" # seconds

cmd =  "#!/bin/bash\n"
cmd +=  "export HOME="+home+"\n"
cmd +=  "date '+%Y-%m-%d %H:%M:%S.000 =========================================='                    >> '"+logFile+"'\n"
cmd +=  "date '+%Y-%m-%d %H:%M:%S.000 stop and relaunch indogo after "+ waitBfRelaunch +" seconds '  >> '"+logFile+"'\n"
cmd +=  "date '+%Y-%m-%d %H:%M:%S.000 ==relaunch==    stop indigo app '                              >> '"+logFile+"'\n"
cmd +=  "/usr/bin/osascript -e 'quit app \"Indigo "+indigoV+"\"'                                     >> '"+logFile+"'\n"
cmd +=  "date '+%Y-%m-%d %H:%M:%S.000 ==relaunch==    sleep 1 '                                      >> '"+logFile+"'\n"
cmd += "/bin/sleep 1\n"
cmd +=  "date '+%Y-%m-%d %H:%M:%S.000 ==relaunch==    stop indogo server'                            >> '"+logFile+"'\n"
cmd += "/usr/local/indigo/indigo-stop                                                                >> '"+logFile+"'\n"
cmd +=  "date '+%Y-%m-%d %H:%M:%S.000 ==relaunch==    sleep "+ waitBfRelaunch +"'                    >> '"+logFile+"'\n"
cmd += "/bin/sleep "+ waitBfRelaunch +"\n"
cmd +=  "date '+%Y-%m-%d %H:%M:%S.000 ==relaunch==    start indigo server'                           >> '"+logFile+"'\n"
cmd += "/usr/local/indigo/indigo-start                                                               >> '"+logFile+"'\n"
cmd +=  "date '+%Y-%m-%d %H:%M:%S.000 ==relaunch==    sleep 3'                                       >> '"+logFile+"'\n"
cmd += "/bin/sleep 3\n"
cmd +=  "date '+%Y-%m-%d %H:%M:%S.000 ==relaunch==    start indigo app'                              >> '"+logFile+"'\n"
cmd += "/usr/bin/open '/Applications/Indigo "+indigoV+".app'                                         >> '"+logFile+"'\n"
cmd +=  "date '+%Y-%m-%d %H:%M:%S.000 ==relaunch==    done'                                          >> '"+logFile+"'\n"
cmd +=  "date '+%Y-%m-%d %H:%M:%S.000 ========================================='                     >> '"+logFile+"'\n"
f=open("/tmp/restartIndigo.sh","w")
f.write(cmd)
f.close()
indigo.server.log("/tmp/restartIndigo.sh &  --> \n"+cmd )
os.system("chmod +x /tmp/restartIndigo.sh")
os.system("/tmp/restartIndigo.sh &")


Karl

Posted on
Sun Sep 08, 2019 2:48 pm
Busta999 offline
User avatar
Posts: 589
Joined: Mar 30, 2016
Location: Wales UK

Re: Started getting loads of SQL Logger errors

jay (support) wrote:
Busta999 wrote:
I am/was running Postgres :-)


Did you try to repair the Postgres db? I think there are tools out there...


No I did not.

All the historical data I am using is in the CSV files crated by MatPlotLib.

Is there anything else I am missing? Because it is just running fine once I created a new one.

Who is online

Users browsing this forum: No registered users and 1 guest