core: add new init_script_path option:
`init_script_path` option can be used in `[DEFAULTS]` to run a script at the end of backend initialisation. A new `init_pre_script` method is used to wait for backend to reach this stage (designed to be used mostly by CLI frontend), then the usual `ready_get` method is finished once the script is finished.
This commit is contained in:
parent
258c99b3c5
commit
e14dd9da8b
1 changed files with 83 additions and 10 deletions
|
|
@ -380,10 +380,10 @@ class Memory:
|
|||
auth_d.addCallback(do_start_session)
|
||||
return auth_d
|
||||
|
||||
if self.host.initialised.called:
|
||||
if self.host.init_pre_script.called:
|
||||
return defer.succeed(None).addCallback(backend_initialised)
|
||||
else:
|
||||
return self.host.initialised.addCallback(backend_initialised)
|
||||
return self.host.init_pre_script.addCallback(backend_initialised)
|
||||
|
||||
def stop_session(self, profile):
|
||||
"""Delete a profile session
|
||||
|
|
|
|||
Loading…
Reference in a new issue