##// END OF EJS Templates
Merge pull request #8100 from minrk/parallel-allow-none...
Thomas Kluyver -
r20803:8cd36825 merge
parent child Browse files
Show More
@@ -114,8 +114,6 b' class BaseLauncher(LoggingConfigurable):'
114 114 super(BaseLauncher, self).__init__(work_dir=work_dir, config=config, **kwargs)
115 115 self.state = 'before' # can be before, running, after
116 116 self.stop_callbacks = []
117 self.start_data = None
118 self.stop_data = None
119 117
120 118 @property
121 119 def args(self):
@@ -368,7 +366,6 b' class LocalEngineSetLauncher(LocalEngineLauncher):'
368 366 super(LocalEngineSetLauncher, self).__init__(
369 367 work_dir=work_dir, config=config, **kwargs
370 368 )
371 self.stop_data = {}
372 369
373 370 def start(self, n):
374 371 """Start n engines by profile or profile_dir."""
@@ -1,10 +1,6 b''
1 1 """A Task logger that presents our DB interface,
2 2 but exists entirely in memory and implemented with dicts.
3 3
4 Authors:
5
6 * Min RK
7
8 4
9 5 TaskRecords are dicts of the form::
10 6
@@ -36,14 +32,17 b' DictDB supports a subset of mongodb operators::'
36 32
37 33 $lt,$gt,$lte,$gte,$ne,$in,$nin,$all,$mod,$exists
38 34 """
39 #-----------------------------------------------------------------------------
40 # Copyright (C) 2010-2011 The IPython Development Team
41 #
42 # Distributed under the terms of the BSD License. The full license is in
43 # the file COPYING, distributed as part of this software.
44 #-----------------------------------------------------------------------------
45
46 from copy import deepcopy as copy
35
36 # Copyright (c) IPython Development Team.
37 # Distributed under the terms of the Modified BSD License.
38
39 import copy
40 from copy import deepcopy
41
42 # Python can't copy memoryviews, but creating another memoryview works for us
43 copy._deepcopy_dispatch[memoryview] = lambda x, memo: memoryview(x)
44
45
47 46 from datetime import datetime
48 47
49 48 from IPython.config.configurable import LoggingConfigurable
@@ -146,7 +145,7 b' class DictDB(BaseDB):'
146 145
147 146 for rec in itervalues(self._records):
148 147 if self._match_one(rec, tests):
149 matches.append(copy(rec))
148 matches.append(deepcopy(rec))
150 149 return matches
151 150
152 151 def _extract_subdict(self, rec, keys):
@@ -155,7 +154,7 b' class DictDB(BaseDB):'
155 154 d['msg_id'] = rec['msg_id']
156 155 for key in keys:
157 156 d[key] = rec[key]
158 return copy(d)
157 return deepcopy(d)
159 158
160 159 # methods for monitoring size / culling history
161 160
@@ -225,7 +224,7 b' class DictDB(BaseDB):'
225 224 raise KeyError("Record %r has been culled for size" % msg_id)
226 225 if not msg_id in self._records:
227 226 raise KeyError("No such msg_id %r"%(msg_id))
228 return copy(self._records[msg_id])
227 return deepcopy(self._records[msg_id])
229 228
230 229 def update_record(self, msg_id, rec):
231 230 """Update the data in an existing record."""
General Comments 0
You need to be logged in to leave comments. Login now