Skip to content
Snippets Groups Projects
Commit eddcd67b authored by Christian Pointner's avatar Christian Pointner
Browse files

disable some debug output

parent a5ed1103
No related branches found
No related tags found
No related merge requests found
...@@ -105,7 +105,7 @@ func (ch *FlowJSFileChunk) ReadFrom(r io.Reader) (n int64, err error) { ...@@ -105,7 +105,7 @@ func (ch *FlowJSFileChunk) ReadFrom(r io.Reader) (n int64, err error) {
return 0, ErrFlowJSChunkAlreadUploading return 0, ErrFlowJSChunkAlreadUploading
} }
fmt.Printf("starting upload: %s\n", ch.filename) // fmt.Printf("starting upload: %s\n", ch.filename)
if ch.file, err = os.OpenFile(ch.filename, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0600); err != nil { if ch.file, err = os.OpenFile(ch.filename, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0600); err != nil {
return return
} }
...@@ -113,7 +113,7 @@ func (ch *FlowJSFileChunk) ReadFrom(r io.Reader) (n int64, err error) { ...@@ -113,7 +113,7 @@ func (ch *FlowJSFileChunk) ReadFrom(r io.Reader) (n int64, err error) {
} }
func (ch *FlowJSFileChunk) Reset() (err error) { func (ch *FlowJSFileChunk) Reset() (err error) {
fmt.Printf("reseting chunk: %s\n", ch.filename) // fmt.Printf("reseting chunk: %s\n", ch.filename)
if err = ch.file.Truncate(0); err != nil { if err = ch.file.Truncate(0); err != nil {
return return
} }
...@@ -125,7 +125,7 @@ func (ch *FlowJSFileChunk) Reset() (err error) { ...@@ -125,7 +125,7 @@ func (ch *FlowJSFileChunk) Reset() (err error) {
} }
func (ch *FlowJSFileChunk) Complete() (err error) { func (ch *FlowJSFileChunk) Complete() (err error) {
fmt.Printf("completing chunk: %s\n", ch.filename) // fmt.Printf("completing chunk: %s\n", ch.filename)
if _, err = ch.file.Seek(0, io.SeekStart); err != nil { if _, err = ch.file.Seek(0, io.SeekStart); err != nil {
return return
} }
...@@ -135,7 +135,7 @@ func (ch *FlowJSFileChunk) Complete() (err error) { ...@@ -135,7 +135,7 @@ func (ch *FlowJSFileChunk) Complete() (err error) {
} }
func (ch *FlowJSFileChunk) Cleanup() (err error) { func (ch *FlowJSFileChunk) Cleanup() (err error) {
fmt.Printf("cleaning up chunk: %s\n", ch.filename) // fmt.Printf("cleaning up chunk: %s\n", ch.filename)
if err = ch.file.Close(); err != nil { if err = ch.file.Close(); err != nil {
return err return err
} }
...@@ -171,7 +171,7 @@ func newFlowJSFile(id string, numChunks uint64, size uint64, job *importer.Job) ...@@ -171,7 +171,7 @@ func newFlowJSFile(id string, numChunks uint64, size uint64, job *importer.Job)
func (f *FlowJSFile) Read(p []byte) (n int, err error) { func (f *FlowJSFile) Read(p []byte) (n int, err error) {
for { for {
if f.readOffset >= len(f.chunks) { if f.readOffset >= len(f.chunks) {
fmt.Printf("all chunks are read. we are done!\n") // fmt.Printf("all chunks are read. we are done!\n")
// we already read all the chunks // we already read all the chunks
return 0, io.EOF return 0, io.EOF
} }
...@@ -185,13 +185,13 @@ func (f *FlowJSFile) Read(p []byte) (n int, err error) { ...@@ -185,13 +185,13 @@ func (f *FlowJSFile) Read(p []byte) (n int, err error) {
if n, err = f.chunks[f.readOffset].Read(p); err == nil || err == io.EOF { if n, err = f.chunks[f.readOffset].Read(p); err == nil || err == io.EOF {
if n > 0 { if n > 0 {
fmt.Printf("successfully read %d bytes from: %s\n", n, f.chunks[f.readOffset].filename) // fmt.Printf("successfully read %d bytes from: %s\n", n, f.chunks[f.readOffset].filename)
err = nil err = nil
return return
} }
// we are at the end of the chunk but haven't read anything yet... so just move on // we are at the end of the chunk but haven't read anything yet... so just move on
} }
fmt.Printf("done reading chunk: %s\n", f.chunks[f.readOffset].filename) // fmt.Printf("done reading chunk: %s\n", f.chunks[f.readOffset].filename)
// we are done with this chunk, clean it up... // we are done with this chunk, clean it up...
if err = f.chunks[f.readOffset].Cleanup(); err != nil { if err = f.chunks[f.readOffset].Cleanup(); err != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment