We are experiencing a weird behavior I haven’t seen before. We have some gateway scripts, one of them we have a function to send an email as below.
def sendEmail (subject,body,sender, recipients, server):
try:
system.net.sendEmail(server, sender, subject, body, 0, recipients)
except Exception, ex:
messagetoSend = "Error sending email: " + str(ex.message)
shared.GW_Scripts.LogErrorMessage("GW_Scripts.EmailScript", messagetoSend)
we have some tags that trigger events to call the function below.
def CallBadPalletNotification(tagPath):
try:
recipients = ['emails']
sender = "email@company.com"
server = "mail.server"
"*** Do something ***"
subject = "A possible bad pallet was detected in line " + str(currentLine)
body = "A possible \"Bad Pallet\" was detected \r\n"
"*** Do more stuff***"
shared.EmailScript.sendEmail(subject,body,sender,recipients,server)
except Exception, ex:
messagetoSend = "Error preparing to send email: " + str(ex.message)
shared.GW_Scripts.LogErrorMessage("GW_Scripts.CallBadPalletNotification", messagetoSend)
When we change the body contents or the recipients lists and save an publish we see the logs “restarting gateway scripts…” for both [Global] and [project].
However when we trigger an event, the recipients and body are still the previous version of the script.
Any ideas??
BTW. Ignition 7.8.4 (b2016082217)