Skip to content

Commit 11cf63f

Browse files
committed
make the temp project key building method public
1 parent dac5fc1 commit 11cf63f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dataikuapi/dss/app.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,17 @@ def create_instance(self, instance_key, instance_name, wait=True):
3939
else:
4040
return future
4141

42+
def make_random_project_key(self):
43+
return "%s_tmp_%s" % (self.app_id, random_string(10))
44+
4245
def create_temporary_instance(self):
4346
"""
4447
Creates a new temporary instance of this app.
4548
The return value should be used as a Python context manager. Upon exit, the temporary app
4649
instance is deleted
4750
:return a :class:`TemporaryDSSAppInstance`
4851
"""
49-
key = "%s_tmp_%s" % (self.app_id, random_string(10))
52+
key = self.make_random_project_key()
5053
instance = self.create_instance(key, key, True)
5154
return TemporaryDSSAppInstance(self.client, key)
5255

0 commit comments

Comments
 (0)