Compare commits
9 Commits
logout-eje
...
main
Author | SHA1 | Date |
---|---|---|
|
84708b7ae1 | |
|
abc2de9f70 | |
|
e8e858d4ce | |
|
40064be81d | |
|
0d7ef61393 | |
|
b17d25083b | |
|
c0483c93c1 | |
|
83a25947bd | |
|
d180917d3b |
18
CHANGELOG.md
18
CHANGELOG.md
|
@ -6,6 +6,24 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [8.0.0] - 2025-08-08
|
||||
|
||||
### Changed
|
||||
|
||||
- Return HTTP 409 on more than one background jobs
|
||||
|
||||
## [7.3.3] - 2025-08-07
|
||||
|
||||
### Fixed
|
||||
|
||||
- wait() for the browser
|
||||
|
||||
## [7.3.2] - 2025-08-04
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix syntax
|
||||
|
||||
## [7.3.1] - 2025-08-04
|
||||
|
||||
### Fixed
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
ogagent (8.0.0-1) stable; urgency=medium
|
||||
|
||||
* Return HTTP 409 on more than one background jobs
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Fri, 08 Aug 2025 13:13:33 +0200
|
||||
|
||||
ogagent (7.3.3-1) stable; urgency=medium
|
||||
|
||||
* wait() for the browser
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Thu, 07 Aug 2025 12:08:39 +0200
|
||||
|
||||
ogagent (7.3.2-1) stable; urgency=medium
|
||||
|
||||
* Fix syntax
|
||||
|
||||
-- OpenGnsys developers <info@opengnsys.es> Mon, 04 Aug 2025 14:36:47 +0200
|
||||
|
||||
ogagent (7.3.1-1) stable; urgency=medium
|
||||
|
||||
* On user logout, write the user to the log
|
||||
|
|
|
@ -1 +1 @@
|
|||
7.3.1
|
||||
8.0.0
|
||||
|
|
|
@ -105,6 +105,7 @@ class HTTPServerHandler(BaseHTTPRequestHandler):
|
|||
self.sendJsonError(500, exceptionToMessage(e))
|
||||
else:
|
||||
arg0 = e.args[0]
|
||||
while isinstance (arg0, Exception): arg0 = arg0.args[0] ## handle nested exceptions
|
||||
if type (arg0) is str:
|
||||
logger.debug ('Message processor for "{}" returned exception string "{}"'.format(path[0], str(e)))
|
||||
self.sendJsonError (500, exceptionToMessage(e))
|
||||
|
|
|
@ -388,7 +388,7 @@ class OpenGnSysWorker(ServerWorker):
|
|||
iters += 1
|
||||
if iters >= 10: break
|
||||
|
||||
try: os.unlink ('/tmp/EjecutarScript-jobid'):
|
||||
try: os.unlink ('/tmp/EjecutarScript-jobid')
|
||||
except: pass
|
||||
|
||||
if job_id is None: return {'op': 'launched'}
|
||||
|
|
|
@ -210,6 +210,11 @@ class ogLiveWorker(ServerWorker):
|
|||
def mon (self):
|
||||
n = 0
|
||||
while True:
|
||||
if self.browser_process is not None:
|
||||
try:
|
||||
self.browser_process.wait (0.05)
|
||||
except subprocess.TimeoutExpired:
|
||||
pass
|
||||
with self.thread_lock:
|
||||
for k in self.thread_list:
|
||||
elem = self.thread_list[k]
|
||||
|
@ -399,7 +404,7 @@ class ogLiveWorker(ServerWorker):
|
|||
if 'ServiceUnknown' in str(e):
|
||||
logger.warning ('browser is not running, launching a new one')
|
||||
browser_log_fd = open ('/var/log/launch_browser.log', 'a')
|
||||
subprocess.Popen (['/usr/bin/launch_browser', url], stdout=browser_log_fd, stderr=subprocess.STDOUT)
|
||||
self.browser_process = subprocess.Popen (['/usr/bin/launch_browser', url], stdout=browser_log_fd, stderr=subprocess.STDOUT)
|
||||
browser_log_fd.close()
|
||||
else:
|
||||
logger.error (f'Error al cambiar URL: ({e})')
|
||||
|
@ -459,6 +464,7 @@ class ogLiveWorker(ServerWorker):
|
|||
self.pid_q = None ## for passing PIDs around
|
||||
self.stdout_q = None ## for passing stdout
|
||||
self.progress_jobs = {}
|
||||
self.browser_process = None
|
||||
|
||||
ogcore_scheme = os.environ.get ('OGAGENTCFG_OGCORE_SCHEME', 'https')
|
||||
ogcore_ip = os.environ.get ('OGAGENTCFG_OGCORE_IP', '192.168.2.1')
|
||||
|
@ -502,7 +508,7 @@ class ogLiveWorker(ServerWorker):
|
|||
break
|
||||
if any_job_running:
|
||||
logger.info ('some job is already running, refusing to launch another one')
|
||||
return { 'job_id': None, 'message': 'some job is already running, refusing to launch another one' }
|
||||
raise Exception ({ '_httpcode': 409, '_msg': 'some job is already running, refusing to launch another one' })
|
||||
|
||||
job_id = '{}-{}'.format (name, ''.join (random.choice ('0123456789abcdef') for _ in range (8)))
|
||||
import queue
|
||||
|
|
Loading…
Reference in New Issue