Merge branch 'next' into payout-fixes
This commit is contained in:
commit
7a79c66ba8
@ -45,7 +45,7 @@ if (empty($aWorkers)) {
|
|||||||
$aData['subject'] = 'IDLE Worker : ' . $aWorker['username'];
|
$aData['subject'] = 'IDLE Worker : ' . $aWorker['username'];
|
||||||
$aData['worker'] = $aWorker['username'];
|
$aData['worker'] = $aWorker['username'];
|
||||||
$aData['email'] = $user->getUserEmail($aData['username']);
|
$aData['email'] = $user->getUserEmail($aData['username']);
|
||||||
$log->logInfo(" " . $aWorker['username'] . "...");
|
$log->logDebug(" " . $aWorker['username'] . "...");
|
||||||
if (!$notification->sendNotification($aWorker['account_id'], 'idle_worker', $aData))
|
if (!$notification->sendNotification($aWorker['account_id'], 'idle_worker', $aData))
|
||||||
$log->logError(" Failed sending notifications: " . $notification->getError() . "\n");
|
$log->logError(" Failed sending notifications: " . $notification->getError() . "\n");
|
||||||
}
|
}
|
||||||
@ -60,15 +60,15 @@ if (!empty($aNotifications)) {
|
|||||||
foreach ($aNotifications as $aNotification) {
|
foreach ($aNotifications as $aNotification) {
|
||||||
$aData = json_decode($aNotification['data'], true);
|
$aData = json_decode($aNotification['data'], true);
|
||||||
$aWorker = $worker->getWorker($aData['id']);
|
$aWorker = $worker->getWorker($aData['id']);
|
||||||
$log->logInfo(" " . $aWorker['username'] . " ...");
|
$log->logDebug(" " . $aWorker['username'] . " ...");
|
||||||
if ($aWorker['hashrate'] > 0) {
|
if ($aWorker['hashrate'] > 0) {
|
||||||
if ($notification->setInactive($aNotification['id'])) {
|
if ($notification->setInactive($aNotification['id'])) {
|
||||||
$log->logInfo(" updated #" . $aNotification['id'] . " for " . $aWorker['username'] . " as inactive\n");
|
$log->logDebug(" updated #" . $aNotification['id'] . " for " . $aWorker['username'] . " as inactive\n");
|
||||||
} else {
|
} else {
|
||||||
$log->logInfo(" failed to update #" . $aNotification['id'] . " for " . $aWorker['username'] . "\n");
|
$log->logInfo(" failed to update #" . $aNotification['id'] . " for " . $aWorker['username'] . "\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$log->logInfo(" still inactive\n");
|
$log->logDebug(" still inactive\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user