Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ai3
tools
tabacco
Commits
6f713bdd
Commit
6f713bdd
authored
Nov 12, 2020
by
ale
Browse files
Remove extraneous log prefix changes
parent
5253979f
Pipeline
#8537
passed with stages
in 1 minute and 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
repository_restic.go
View file @
6f713bdd
...
...
@@ -369,9 +369,8 @@ type resticMessage struct {
// Scan the output of 'restic backup' for the snapshot ID. Modifies backup/dataset objects.
func
(
r
*
resticRepository
)
RunBackup
(
ctx
context
.
Context
,
shell
*
Shell
,
backup
*
Backup
,
ds
*
Dataset
,
cmd
string
)
error
{
logPrefix
:=
fmt
.
Sprintf
(
"backup=%s dataset=%s"
,
backup
.
ID
,
ds
.
ID
)
return
active
.
WithResticStatus
(
jobs
.
GetID
(
ctx
),
backup
,
ds
,
func
(
progressCh
chan
*
resticStatusMessage
)
error
{
return
shell
.
RunWithStdoutCallback
(
ctx
,
cmd
,
logPrefix
,
func
(
line
[]
byte
)
{
return
shell
.
RunWithStdoutCallback
(
ctx
,
cmd
,
func
(
line
[]
byte
)
{
var
msg
resticMessage
if
err
:=
json
.
Unmarshal
(
line
,
&
msg
);
err
!=
nil
{
log
.
Printf
(
"error parsing restic JSON message: %v (%s)"
,
err
,
line
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment