Compare commits

...

2 Commits

Author SHA1 Message Date
Natalia Serrano 6740704919 refs #500 bump version 2024-07-30 14:48:56 +02:00
Natalia Serrano da7dd418c0 refs #500 fix portability issue 2024-07-30 14:47:48 +02:00
4 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,9 @@
ogagent (1.3.4-1) stable; urgency=medium
* Implement JobMgr
-- OpenGnsys developers <info@opengnsys.es> Tue, 30 Jul 2024 13:39:55 +0200
ogagent (1.3.1-1) stable; urgency=medium
* Migrate the update script from shell to python

View File

@ -1,5 +1,9 @@
# -*- mode: python ; coding: utf-8 -*-
## generated on windows using:
## pyi-makespec.exe --windowed --icon img\oga.ico --manifest OGAgent.manifest OGAgentUser.py opengnsys\windows\OGAgentService.py
## move OGAgentUser.spec OGAgent.spec
ogausr_a = Analysis(
['OGAgentUser.py'],

View File

@ -1 +1 @@
1.3.3
1.3.4

View File

@ -21,7 +21,7 @@ class JobMgr():
args = operations.build_popen_args (script)
logger.debug ('args "{}"'.format (args))
now = datetime.now (tz=timezone.utc)
ts = float (now.strftime ('%s.%f'))
ts = now.strftime ('%Y-%m-%d %H:%M:%S.%f%z') ## '%s' doesn't work on windows
jobid = hashlib.sha256 (now.isoformat().encode('UTF-8') + script.encode ('UTF-8')).hexdigest()[0:8]
p = subprocess.Popen (args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
self.jobs[jobid] = { 'p': p, 'pid': p.pid, 'starttime': ts, 'script': script, 'client': is_client, 'status': 'running', 'stdout': '', 'stderr': '' }