|
|
@ -23,6 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
|
|
import logging; logger = logging.getLogger(__name__); logger.info("import") |
|
|
|
|
|
|
|
#Standard Library |
|
|
|
import datetime |
|
|
|
|
|
|
|
|
|
|
|
#Our Modules |
|
|
|
from engine.start import PATHS |
|
|
@ -256,6 +258,23 @@ def getUnfilteredExecutables()->list: |
|
|
|
#No project running |
|
|
|
#There is no callback for _sessionsChanged because we poll that in the event loop. |
|
|
|
|
|
|
|
def sessionNewTimestampe(): |
|
|
|
"""convenience function. Create a new session without requiring a name and add |
|
|
|
suggested infrastructure clients""" |
|
|
|
nsmExecutables = getNsmExecutables() #type set, cached, very fast. |
|
|
|
connectionSaver = METADATA["preferredClients"]["data"] |
|
|
|
dataMeta = METADATA["preferredClients"]["connections"] |
|
|
|
startclients = [] |
|
|
|
if connectionSaver in nsmExecutables: |
|
|
|
startclients.append(connectionSaver) |
|
|
|
if dataMeta in nsmExecutables: |
|
|
|
startclients.append(dataMeta) |
|
|
|
|
|
|
|
#now = datetime.datetime.now().replace(second=0, microsecond=0).isoformat()[:-3] |
|
|
|
now = datetime.datetime.now().replace(microsecond=0).isoformat() |
|
|
|
name = now |
|
|
|
sessionNew(name, startclients) |
|
|
|
|
|
|
|
def sessionNew(newName:str, startClients:list=[]): |
|
|
|
nsmServerControl.new(newName, startClients) |
|
|
|
|
|
|
|