Open alavigne12 opened 5 years ago
By 'QC' check, how granular are you meaning?
We could do something like @dericed's (Dave) approach in this:
https://github.com/mediamicroservices/mm/blob/master/ingestfile#L284
Where it checks to make sure rsync
(the command used to move the file) didn't have any errors and then deletes the file. That would be the fast way.
Alternately, we could calculate the checksums for the original file and the copied file and make sure they are the same - that is the SLOW way, but would be 100% accurate as opposed to the simple rsync check which is like 99.9% accurate. (I am making that number up.)
Currently I assume it is just a visual check to see if the file is there before deletion? So I suppose either of these would make the system more robust?
Dave's method sounds good, but Libby will have to make the final call. Very occassionally videoaip has generated an MP4 that wouldn't play, but that could very likely be a result of faulty input from us. I would be afraid that it would generate a faulty mkv dupe, then delete the original. But it sounds like the rsync option would make sure that didn't happen.
I mean, rsync uses checksum verification on the data it sends and is pretty darn safe from my understanding - it just isn't technically 100% infallible. But on some level, hey if it is good enough for @dericed it is probably good enough for us!
Currently, we have to delete the original MKV after the AIP is created. Ideally, vieoaip would do a QC check on the duplicated MKV, then delete the original for us.