Compare commits

...

5 Commits

Author SHA1 Message Date
Natalia Serrano 84708b7ae1 Merge pull request 'http409' (#55) from http409 into main
Reviewed-on: #55
2025-08-08 13:15:30 +02:00
Natalia Serrano abc2de9f70 refs #2615 update changelogs 2025-08-08 13:14:05 +02:00
Natalia Serrano e8e858d4ce refs #2615 return 409 on >1 background jobs 2025-08-08 13:12:21 +02:00
Natalia Serrano 40064be81d refs #2616 handle nested exceptions 2025-08-08 13:11:41 +02:00
Natalia Serrano 0d7ef61393 Merge pull request 'refs #2600 wait() for the browser' (#54) from wait-browser into main
Reviewed-on: #54
2025-08-07 12:10:36 +02:00
5 changed files with 15 additions and 2 deletions

View File

@ -6,6 +6,12 @@ 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

View File

@ -1,3 +1,9 @@
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

View File

@ -1 +1 @@
7.3.3
8.0.0

View File

@ -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))

View File

@ -508,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