-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pivotal ID # 186322997: S-BIAD877 could not be loaded #762
Conversation
fun deserializeSubmission(file: File): Submission | ||
|
||
suspend fun deserializeSubmission(file: File, source: FileSourcesList): Submission | ||
@Blocking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jhoanmanuelms lets start using this one so we know when a code is blocking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Is looking good getting rid of all the sequences to favor flows 👍
files | ||
.collect { file -> | ||
count.getAndIncrement() | ||
logger.info { "writting file ${count.get()}" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this message might be confusing since it's only displaying a number and we might have several concurrent files, perhaps we should include more info such as the file name
val file = Files.createTempFile("file-list", "${files.size}-files") | ||
val serializer = SerializationConfig.serializationService() | ||
file.outputStream().use { serializer.serializeFileList(files.asSequence(), format, it) } | ||
return file.toFile() | ||
file.outputStream().use { serializer.serializeFileList(files.asFlow(), format, it) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this also be executed in the IO context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes but it will require the function to be suspended and we use it as a top level. So because it is a test I think runBlocking will do.
https://www.pivotaltracker.com/story/show/186322997