Commit 2a2572b3 authored by Huff, Israel's avatar Huff, Israel
Browse files

initial check-in of some queue API calls (currently avoiding some linker...

initial check-in of some queue API calls (currently avoiding some linker issues so organization of code will likely change)
parent 43e6a18d
Pipeline #96618 passed with stages
in 5 minutes and 36 seconds
......@@ -3,11 +3,15 @@ TRIBITS_SUBPACKAGE(core)
SET(HEADERS
sessionworker.hh
sessioncontroller.hh
queuebase.hh
queuepbs.hh
)
SET(SOURCES
hostconfig.cc
sessionworker.cc
sessioncontroller.cc
queuebase.cc
queuepbs.cc
)
QT5_WRAP_CPP(MOC_FILES
......
......@@ -27,7 +27,7 @@ class HostConfig
void setProxyCommand(const QString& proxyCommand);
int port() const;
void setPort(int port);
}; // class
}; // class HostConfig
/**
* @brief write_host_config
......
#include "queuebase.hh"
namespace rsm
{
QueueBase::~QueueBase() {}
QString QueueBase::allnodeinfo()
{
fprintf(stderr, "QueueBase allnodeinfo\n");
return "";
}
QString QueueBase::checkjob(QString params)
{
(void)sizeof(params);
return "";
}
QString QueueBase::qdel(QString params)
{
(void)sizeof(params);
return "";
}
QString QueueBase::qstat(QString params)
{
(void)sizeof(params);
return "";
}
QString QueueBase::qsub(QString params)
{
(void)sizeof(params);
return "";
}
QString QueueBase::showq(QString params)
{
(void)sizeof(params);
return "";
}
} // namespace rsm
#ifndef RSMCORE_QUEUEBASE_HH_
#define RSMCORE_QUEUEBASE_HH_
#include <QString>
namespace rsm
{
class QueueBase
{
public:
virtual ~QueueBase();
// TODO: once downstream issues are fixed, these should be pure virtual
virtual QString allnodeinfo();
virtual QString checkjob(QString params);
virtual QString qdel(QString params);
virtual QString qstat(QString params);
virtual QString qsub(QString params);
virtual QString showq(QString params);
}; // class QueueBase
} // namespace rsm
#endif /* RSMCORE_QUEUEBASE_HH_ */
#include "queuepbs.hh"
namespace rsm
{
QueuePBS::QueuePBS() {}
QueuePBS::~QueuePBS() {}
QString QueuePBS::allnodeinfo()
{
fprintf(stderr, "QueuePBS\n");
return "qstat -F";
}
QString QueuePBS::checkjob(QString params) { return "qstat " + params; }
QString QueuePBS::qdel(QString params) { return "qdel " + params; }
QString QueuePBS::qstat(QString params) { return "qstat " + params; }
QString QueuePBS::qsub(QString params) { return "qsub " + params; }
QString QueuePBS::showq(QString params) { return "asdf " + params; }
} // namespace rsm
#ifndef RSMPBS_QUEUEPBS_HH_
#define RSMPBS_QUEUEPBS_HH_
#include "rsmcore/queuebase.hh"
namespace rsm
{
class QueuePBS : public QueueBase
{
public:
QueuePBS();
~QueuePBS() override;
QString allnodeinfo() override;
QString checkjob(QString params) override;
QString qdel(QString params) override;
QString qstat(QString params) override;
QString qsub(QString params) override;
QString showq(QString params) override;
}; // class QueuePBS
} // namespace rsm
#endif /* RSMPBS_QUEUEPBS_HH_ */
#include "rsmcore/sessioncontroller.hh"
#include "rsmcore/sessionworker.hh"
......@@ -19,8 +18,8 @@ class SessionControllerImpl
thread = new QThread();
worker->moveToThread(thread);
thread->start();
} // SessionControllerImpl constructor
~SessionControllerImpl()
{
radix_tagged_line("~SessionControllerImpl()");
......
......@@ -30,6 +30,7 @@ class RSM_PUBLIC SessionController : public QObject
~SessionController();
QByteArray readExecOutput();
public slots:
/**
......
......@@ -10,9 +10,7 @@ SET(SOURCES
QT5_WRAP_CPP(MOC_FILES
${HEADERS}
)
SET(HEADERS
${HEADERS}
)
TRIBITS_ADD_LIBRARY(rsmpbs
SOURCES ${SOURCES} ${MOC_FILES}
NOINSTALLHEADERS ${HEADERS}
......
#include "rsmpbs/pbssession.hh"
namespace rsm
......@@ -22,5 +20,4 @@ PBSSession::~PBSSession()
delete p;
}
}
} // namespace rsm
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment