Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
matrix-media-repo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
matrix-media-repo
Commits
435ce339
Commit
435ce339
authored
5 years ago
by
Travis Ralston
Browse files
Options
Downloads
Patches
Plain Diff
Fix NPEs when the initial log context is used
parent
e273b833
No related branches found
No related tags found
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmd/media_repo/inits.go
+2
-2
2 additions, 2 deletions
cmd/media_repo/inits.go
common/rcontext/request_context.go
+1
-1
1 addition, 1 deletion
common/rcontext/request_context.go
with
3 additions
and
3 deletions
cmd/media_repo/inits.go
+
2
−
2
View file @
435ce339
...
@@ -54,9 +54,9 @@ func scanAndStartUnfinishedTasks() error {
...
@@ -54,9 +54,9 @@ func scanAndStartUnfinishedTasks() error {
return
err
return
err
}
}
logrus
.
Infof
(
"Started replacement task ID %d for unfinished task %d (%s)"
,
newTask
.
ID
,
task
.
ID
,
task
.
Name
)
taskCtx
.
Log
.
Infof
(
"Started replacement task ID %d for unfinished task %d (%s)"
,
newTask
.
ID
,
task
.
ID
,
task
.
Name
)
}
else
{
}
else
{
logrus
.
Warn
(
fmt
.
Sprintf
(
"Unknown task %s at ID %d - ignoring"
,
task
.
Name
,
task
.
ID
))
taskCtx
.
Log
.
Warn
(
fmt
.
Sprintf
(
"Unknown task %s at ID %d - ignoring"
,
task
.
Name
,
task
.
ID
))
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
common/rcontext/request_context.go
+
1
−
1
View file @
435ce339
...
@@ -10,7 +10,7 @@ import (
...
@@ -10,7 +10,7 @@ import (
func
Initial
()
RequestContext
{
func
Initial
()
RequestContext
{
return
RequestContext
{
return
RequestContext
{
Context
:
context
.
Background
(),
Context
:
context
.
Background
(),
Log
:
&
logrus
.
Entry
{}
,
Log
:
logrus
.
WithFields
(
logrus
.
Fields
{
"nocontext"
:
true
})
,
Config
:
config
.
DomainRepoConfig
{
Config
:
config
.
DomainRepoConfig
{
MinimumRepoConfig
:
config
.
Get
()
.
MinimumRepoConfig
,
MinimumRepoConfig
:
config
.
Get
()
.
MinimumRepoConfig
,
Downloads
:
config
.
Get
()
.
Downloads
.
DownloadsConfig
,
Downloads
:
config
.
Get
()
.
Downloads
.
DownloadsConfig
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment