Created
July 20, 2017 19:52
-
-
Save johngrantuk/810c5783ad0df3bdd445ecbcb9156d77 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def WorkCheck(): | |
try: | |
# HERE SOME INITIAL WORK IS DONE THAT SCRIPTS 1 & 2 NEED TO WAIT FOR | |
# IDs SERIAL PORTS | |
# SAVE TO db | |
r = redis.StrictRedis(host='localhost', port=6379) # Connect to local Redis instance | |
p = r.pubsub() # See https://github.com/andymccurdy/redis-py/#publish--subscribe | |
print("Starting main scripts...") | |
r.publish('startScripts', 'START') # PUBLISH START message on startScripts channel | |
print("Done") | |
except Exception as e: | |
print("!!!!!!!!!! EXCEPTION !!!!!!!!!") | |
print(str(e)) | |
print(traceback.format_exc()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment