http409 #55

Merged
nserrano merged 3 commits from http409 into main 2025-08-08 13:15:31 +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