mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-16 12:08:04 +00:00
tasks: improve log level
This commit is contained in:
+2
-2
@@ -155,7 +155,7 @@ func maybeRunTaskInBackground(c *gin.Context, name string, resources []string, p
|
|||||||
// Run this task in background if configured globally or per-request
|
// Run this task in background if configured globally or per-request
|
||||||
background := truthy(c.DefaultQuery("_async", strconv.FormatBool(context.Config().AsyncAPI)))
|
background := truthy(c.DefaultQuery("_async", strconv.FormatBool(context.Config().AsyncAPI)))
|
||||||
if background {
|
if background {
|
||||||
log.Info().Msg("Executing task asynchronously")
|
log.Debug().Msg("Executing task asynchronously")
|
||||||
task, conflictErr := runTaskInBackground(name, resources, proc)
|
task, conflictErr := runTaskInBackground(name, resources, proc)
|
||||||
if conflictErr != nil {
|
if conflictErr != nil {
|
||||||
AbortWithJSONError(c, 409, conflictErr)
|
AbortWithJSONError(c, 409, conflictErr)
|
||||||
@@ -163,7 +163,7 @@ func maybeRunTaskInBackground(c *gin.Context, name string, resources []string, p
|
|||||||
}
|
}
|
||||||
c.JSON(202, task)
|
c.JSON(202, task)
|
||||||
} else {
|
} else {
|
||||||
log.Info().Msg("Executing task synchronously")
|
log.Debug().Msg("Executing task synchronously")
|
||||||
out := context.Progress()
|
out := context.Progress()
|
||||||
detail := task.Detail{}
|
detail := task.Detail{}
|
||||||
retValue, err := proc(out, &detail)
|
retValue, err := proc(out, &detail)
|
||||||
|
|||||||
Reference in New Issue
Block a user