mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-12 09:34:57 +08:00
start_build_component: add missing db_session parameter
This commit is contained in:
@@ -67,7 +67,9 @@ def start_build_component(db_session, builder, c):
|
||||
c.state_reason = "Failed to build artifact %s: %s" % (c.package, str(e))
|
||||
log.exception(e)
|
||||
with BUILD_COMPONENT_DB_SESSION_LOCK:
|
||||
c.module_build.transition(conf, models.BUILD_STATES["failed"], failure_type="infra")
|
||||
c.module_build.transition(
|
||||
db_session, conf, models.BUILD_STATES["failed"], failure_type="infra"
|
||||
)
|
||||
db_session.commit()
|
||||
return
|
||||
|
||||
@@ -75,7 +77,9 @@ def start_build_component(db_session, builder, c):
|
||||
c.state = koji.BUILD_STATES["FAILED"]
|
||||
c.state_reason = "Failed to build artifact %s: Builder did not return task ID" % (c.package)
|
||||
with BUILD_COMPONENT_DB_SESSION_LOCK:
|
||||
c.module_build.transition(conf, models.BUILD_STATES["failed"], failure_type="infra")
|
||||
c.module_build.transition(
|
||||
db_session, conf, models.BUILD_STATES["failed"], failure_type="infra"
|
||||
)
|
||||
db_session.commit()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user