mirror of
https://github.com/arcan1s/queued.git
synced 2025-07-10 04:15:49 +00:00
implement usage of native cgroups instead of systemd-run
* allow server to be started w\o daemon * handle process childs
This commit is contained in:
@ -18,6 +18,8 @@
|
||||
|
||||
#include <queued/Queued.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "QueuedTcpServer.h"
|
||||
|
||||
|
||||
@ -43,6 +45,15 @@ QueuedServer::~QueuedServer()
|
||||
|
||||
void QueuedServer::init()
|
||||
{
|
||||
while (QueuedCoreAdaptor::getStatus().type() != Result::Content::Value) {
|
||||
qCWarning(LOG_SERV)
|
||||
<< "Daemon seems to be unavailable wait" << WAIT_FOR_DAEMON;
|
||||
|
||||
QTime timer = QTime::currentTime().addMSecs(WAIT_FOR_DAEMON);
|
||||
while (QTime::currentTime() < timer)
|
||||
QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
|
||||
}
|
||||
|
||||
m_server->init(QueuedCoreAdaptor::getOption(
|
||||
QueuedConfig::QueuedSettings::ServerTimeout)
|
||||
.get()
|
||||
|
@ -28,6 +28,8 @@ class QueuedServer : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static const long WAIT_FOR_DAEMON = 30000;
|
||||
|
||||
explicit QueuedServer(QObject *parent, const QVariantHash &args);
|
||||
virtual ~QueuedServer();
|
||||
void init();
|
||||
|
Reference in New Issue
Block a user