TromboneDavies / PolarOps

0 stars 0 forks source link

Add a new log file to help track timing #64

Closed divilian closed 2 years ago

divilian commented 3 years ago

Write to a separate file the (1) timestamp of the thread we just read, and (2) the actual today clock time, every time we read from a thread. So:

  1. In collector.py, open up a second file (called something.log) to which you can write pairs of timestamps.
  2. Every time the collector.py writes a line to the .csv file (which has one thread's worth of information), also write a line to this second file, with both the thread's TLC date and the instantaneous system date.)
  3. And flush! :)
akochans commented 3 years ago

Admittedly, I have not tested this new addition and it does not check for collecting.log's prior existence so it will re-append the headers if you run the bot a second time (I think).

Update: tried it, doesn't work

akochans commented 3 years ago

Update part 2: I'm getting an error saying I'm trying to run an operation on a closed file but I don't feel like I am. If someone could look over that would be great.

divilian commented 2 years ago

nice job @akochans