MCPcopy Index your code
hub / github.com/SpaceNetLab/StarryNet / sn_init_directory_thread

Class sn_init_directory_thread

starrynet/sn_utils.py:188–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186
187# A thread designed for initializing working directory.
188class sn_init_directory_thread(threading.Thread):
189
190 def __init__(self, file_path, configuration_file_path, remote_ssh):
191 threading.Thread.__init__(self)
192 self.file_path = file_path
193 self.remote_ssh = remote_ssh
194 self.configuration_file_path = configuration_file_path
195
196 def run(self):
197 # Reset docker environment.
198 os.system("rm " + self.configuration_file_path + "/" + self.file_path +
199 "/*.txt")
200 if os.path.exists(self.file_path + "/mid_files") == False:
201 os.system("mkdir " + self.configuration_file_path + "/" +
202 self.file_path)
203 os.system("mkdir " + self.configuration_file_path + "/" +
204 self.file_path + "/delay")
205 os.system("mkdir " + self.configuration_file_path + "/" +
206 self.file_path + "/mid_files")
207 sn_remote_cmd(self.remote_ssh, "mkdir ~/" + self.file_path)
208 sn_remote_cmd(self.remote_ssh, "mkdir ~/" + self.file_path + "/delay")
209
210
211# A thread designed for initializing constellation nodes.

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected