fix frozen and metric for checking iteration
This commit is contained in:
@ -167,7 +167,7 @@ void Drive::checkFrozenDrive(void)
|
||||
time_t u32localtime;
|
||||
time(&u32localtime);
|
||||
|
||||
if((u32localtime - this->u32Timestamp) >= (FROZEN_TIMEOUT*60) && (this->u32Timestamp > 0))
|
||||
if((u32localtime - this->u32Timestamp) >= (FROZEN_TIMEOUT*60) && (this->u32Timestamp > 0) && (this->getTaskPercentage() < 100.0))
|
||||
{
|
||||
Logger::logThis()->warning("Drive Frozen: " + this->getModelName() + " " + this->getSerial());
|
||||
this->bWasDeleteted = false;
|
||||
|
@ -270,10 +270,11 @@ unsigned int Shred::uiCalcChecksum(fileDescriptor file,Drive* drive, int* ipSign
|
||||
ulDriveByteCounter += iReadBytes;
|
||||
ulDriveByteOverallCount += iReadBytes;
|
||||
d32Percent = this->calcProgress();
|
||||
drive->sShredSpeed.ulSpeedMetricBytesWritten += iReadBytes;
|
||||
#ifdef LOG_LEVEL_HIGH
|
||||
Logger::logThis()->info("Shred-Task (Checksum): ByteCount: " + to_string(ulDriveByteCounter) + " - progress: " + to_string(d32Percent) + " - Drive: " + drive->getSerial());
|
||||
#endif
|
||||
if((d32Percent-d32TmpPercent) >= 0.9)
|
||||
if((d32Percent-d32TmpPercent) >= 0.01)
|
||||
{
|
||||
drive->setTaskPercentage(d32TmpPercent);
|
||||
d32TmpPercent = d32Percent;
|
||||
|
Reference in New Issue
Block a user