Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
scdaq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scouting-demonstrator
scdaq
Commits
d76345c4
Commit
d76345c4
authored
1 month ago
by
Giovanna Lazzari Miotto
Browse files
Options
Downloads
Patches
Plain Diff
fix: sink: Move file close call out of assertion
parent
718f1fb4
No related branches found
No related tags found
1 merge request
!109
Introduce pipeline synchronization, output template and parallel sink
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sink.cc
+10
-1
10 additions, 1 deletion
src/sink.cc
with
10 additions
and
1 deletion
src/sink.cc
+
10
−
1
View file @
d76345c4
...
...
@@ -5,6 +5,14 @@
#include
"sink.h"
#include
<tbb/concurrent_queue.h>
#include
<cassert>
#include
<fstream>
#include
"OutputFile.h"
#include
"log.h"
template
class
Sink
<
FileOutput
>;
template
<
typename
TOutput
>
...
...
@@ -31,7 +39,8 @@ void Sink<TOutput>::CommitOutput(const TOutput &f) {
auto
file
=
reinterpret_cast
<
const
FileOutput
&>
(
f
);
auto
filename
=
file
.
GetFilename
();
LOG
(
TRACE
)
<<
"Closing file '"
<<
filename
<<
"'"
;
assert
(
file
.
Close
());
auto
is_closed
=
file
.
Close
();
assert
(
is_closed
);
auto
from
=
file
.
GetWorkingPath
()
+
"/"
+
filename
;
auto
to
=
GetRootPath
()
+
file
.
GetDestinationDir
()
+
"/"
+
filename
;
if
(
rename
(
from
.
c_str
(),
to
.
c_str
())
!=
0
)
{
...
...
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