mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-21 20:28:10 +00:00
I noticed we were saving the workflow every time we loaded it up, rather than only when we were making changes to it. Refactored this to be a little more careful. Centralized the saving of the workflow into one location in the processor, so we can make sure we update all the details about that workflow every time we save. The workflow service has a method that will log any task action taken in a consistent way. The stats models were removed from the API completely. Will wait for a use case for dealing with this later.
61 lines
1.4 KiB
Python
61 lines
1.4 KiB
Python
# This is the basic logging file, but with some additional details like SMTP Configuration
|
|
# which we will want to use on the production servers, which will fire off emails to administrators
|
|
# in the event of a failure.
|
|
logging_config = {
|
|
'version': 1,
|
|
"loggers": {
|
|
"console": {
|
|
"level": "DEBUG",
|
|
"propagate": False,
|
|
"handlers": [
|
|
"console"
|
|
]
|
|
},
|
|
"file": {
|
|
"level": "DEBUG",
|
|
"propagate": False,
|
|
"handlers": [
|
|
"file"
|
|
]
|
|
}
|
|
},
|
|
"formatters": {
|
|
"simple": {
|
|
"format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
|
}
|
|
},
|
|
"root": {
|
|
"level": "DEBUG",
|
|
"handlers": [
|
|
"console",
|
|
"file",
|
|
"email"
|
|
]
|
|
},
|
|
"handlers": {
|
|
"console": {
|
|
"formatter": "simple",
|
|
"class": "logging.StreamHandler",
|
|
"stream": "ext://sys.stdout",
|
|
"level": "DEBUG"
|
|
},
|
|
"file": {
|
|
"level": "DEBUG",
|
|
"formatter": "simple",
|
|
"class": "logging.FileHandler",
|
|
"filename": "star_drive.log"
|
|
},
|
|
"email": {
|
|
"level": "ERROR",
|
|
"formatter": "simple",
|
|
"class": "logging.handlers.SMTPHandler",
|
|
"credentials": ("<<USERNAME>>","<<PASSWORD>>"),
|
|
"mailhost": ["smtp.mailtrap.io", 2525],
|
|
"fromaddr": "alerts@star.virginia.edu",
|
|
"toaddrs": ["admin@star.virginia.edu"],
|
|
"subject": "Autism DRIVE FAILURE",
|
|
}
|
|
}
|
|
}
|
|
|