Commit 371ed356770c4e93c82760a907a6303b8e779fd0
1 parent
05721739
added a check to only compute the matrix if it doesn't already exist
Showing
1 changed file
with
5 additions
and
2 deletions
sdk/plugins/youtube.cpp
| ... | ... | @@ -30,9 +30,12 @@ class YouTubeFacesDBTransform : public UntrainableMetaTransform |
| 30 | 30 | << "-parallelism" << QString::number(Globals->parallelism) |
| 31 | 31 | << "-path" << Globals->path |
| 32 | 32 | << "-compare" << File(words[2]).resolved() << File(words[3]).resolved() << matrix; |
| 33 | - mutex.lock(); | |
| 34 | - int result = QProcess::execute(QCoreApplication::applicationFilePath(), arguments); | |
| 33 | + mutex.lock(); | |
| 34 | + int result = 0; | |
| 35 | + if (!QFileInfo(matrix).exists()) | |
| 36 | + QProcess::execute(QCoreApplication::applicationFilePath(), arguments); | |
| 35 | 37 | mutex.unlock(); |
| 38 | + | |
| 36 | 39 | if (result != 0) |
| 37 | 40 | qWarning("Process for computing %s returned %d.", qPrintable(matrix), result); |
| 38 | 41 | dst = Template(); | ... | ... |