Changeset 439 in tmcsimulator for trunk/webapps/unifiedlogger/cad_watcher.py


Ignore:
Timestamp:
07/11/2019 02:45:25 PM (7 years ago)
Author:
jdalbey
Message:

setup wing project for logging service python files. Add config file for file paths.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/webapps/unifiedlogger/cad_watcher.py

    r436 r439  
    33 
    44# CAD comment log Watcher 
    5 # Look for changes in the CAD comment log 
     5# Look for changes in the CAD comment log. 
     6# The CADserver will append new comments to the log as they arrive  
     7# from clients.  We only need to keep track of the log length in order to 
     8# determine if a new comment has been added.  We will output the  
     9# new messages that arrived during the last wait interval.  
    610# jdalbey  7/6/2019 
    711 
     
    1418    return not isEmpty(cmsitem) 
    1519 
    16 # Read the cms message file 
     20# Read the cad comments log  
    1721def readFile(): 
    1822    lines = [] 
    1923    try: 
    20         text_file = open("../../CADcomments.log", "r") 
     24        text_file = open("CADcomments.log", "r") 
    2125    except IOError: 
    2226        print "Error: missing CADcomments.log file." 
     
    3943    return currList 
    4044 
     45# Local main for unit testing 
    4146def main(): 
    4247    setup() 
    43     # Loop Forever 
     48    # Loop Forever, checking every five seconds 
    4449    while True: 
    45         # Look for changed messages 
     50        # Look for new messages 
    4651        answer = getLogEntries() 
    4752        # Output results 
Note: See TracChangeset for help on using the changeset viewer.