File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1818from datetime import datetime , timedelta
1919import gzip
2020import math
21- from multiprocessing import cpu_count , get_context
21+ from multiprocessing import get_context
2222import os
2323
2424from buoy_api import Interface
@@ -83,7 +83,7 @@ class WECLogger(Interface):
8383
8484 def __init__ (self , loghome , logdir = None ):
8585 super ().__init__ ('sim_pblog' , check_for_services = False )
86- self .zip_pool = get_context ('spawn' ).Pool (processes = cpu_count ())
86+ self .zip_pool = get_context ('spawn' ).Pool (processes = 1 ) # one thread to gzip
8787 self .start_time = datetime .now ()
8888 self .logger_time = self .start_time
8989
@@ -404,7 +404,10 @@ def main():
404404 rclpy .init (args = extras )
405405 pblog = WECLogger (args .loghome if args .loghome else loghome_arg .default ,
406406 args .logdir if args .logdir else logdir_arg .default )
407- rclpy .spin (pblog )
407+ import time
408+ while rclpy .ok ():
409+ rclpy .spin_once (pblog )
410+ time .sleep (1. / 100. )
408411 rclpy .shutdown ()
409412
410413
You can’t perform that action at this time.
0 commit comments