mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 01:31:37 +02:00
require a flag to enable payment to assigned nodes
This commit is contained in:
parent
1dddabb691
commit
b7727f0b16
1 changed files with 40 additions and 31 deletions
|
@ -191,9 +191,11 @@ void DomainServer::setupNodeListAndAssignments(const QUuid& sessionUUID) {
|
|||
|
||||
bool DomainServer::optionallyLoginAndSetupAssignmentPayment() {
|
||||
// check if we have a username and password set via env
|
||||
const QString ASSIGNED_NODE_PAYMENT_OPTION = "pay-nodes";
|
||||
const QString HIFI_USERNAME_ENV_KEY = "DOMAIN_SERVER_USERNAME";
|
||||
const QString HIFI_PASSWORD_ENV_KEY = "DOMAIN_SERVER_PASSWORD";
|
||||
|
||||
if (_argumentVariantMap.contains(ASSIGNED_NODE_PAYMENT_OPTION)) {
|
||||
if (!_oauthProviderURL.isEmpty()) {
|
||||
|
||||
AccountManager& accountManager = AccountManager::getInstance();
|
||||
|
@ -229,6 +231,13 @@ bool DomainServer::optionallyLoginAndSetupAssignmentPayment() {
|
|||
|
||||
const qint64 TRANSACTION_SEND_INTERVAL_MSECS = 30 * 1000;
|
||||
nodePaymentTimer->start(TRANSACTION_SEND_INTERVAL_MSECS);
|
||||
|
||||
} else {
|
||||
qDebug() << "Missing OAuth provider URL, but assigned node payment was enabled. domain-server will now quit.";
|
||||
QMetaObject::invokeMethod(this, "quit", Qt::QueuedConnection);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue