Skip to content

Commit a38c8ea

Browse files
committed
don't put cluster_id in app.name
app.name affects which config files to load
1 parent 5a791db commit a38c8ea

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

ipyparallel/apps/baseapp.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,6 @@ def _work_dir_changed(self, change):
118118
""",
119119
)
120120

121-
@observe('cluster_id')
122-
def _cluster_id_changed(self, change):
123-
if change['new']:
124-
self.name = '{}-{}'.format(self.__class__.name, change['new'])
125-
else:
126-
self.name = self.__class__.name
127-
128121
loop = Instance(IOLoop)
129122

130123
def _loop_default(self):
@@ -197,7 +190,7 @@ def reinit_logging(self):
197190
pass
198191
if self.log_to_file:
199192
# Start logging to the new log file
200-
log_filename = self.name + u'-' + str(os.getpid()) + u'.log'
193+
log_filename = f"{self.name}-{self.cluster_id}-{os.getpid()}.log"
201194
logfile = os.path.join(log_dir, log_filename)
202195
if sys.__stderr__:
203196
print(f"Sending logs to {logfile}", file=sys.__stderr__)

ipyparallel/controller/app.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,11 @@ class IPController(BaseParallelApplication):
235235

236236
@observe('cluster_id')
237237
def _cluster_id_changed(self, change):
238-
super()._cluster_id_changed(change)
239-
self.engine_json_file = "%s-engine.json" % self.name
240-
self.client_json_file = "%s-client.json" % self.name
238+
base = 'ipcontroller'
239+
if change.new:
240+
base = f"{base}-{change.new}"
241+
self.engine_json_file = f"{base}-engine.json"
242+
self.client_json_file = f"{base}-client.json"
241243

242244
# internal
243245
children = List()

0 commit comments

Comments
 (0)