1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2026-03-02 03:40:21 +00:00

rundir could not be kept, use consistent naming

This commit is contained in:
Oliver Giles
2017-10-14 17:51:24 +03:00
parent f96e58c3f1
commit 32426ee34f
4 changed files with 10 additions and 9 deletions

View File

@@ -73,7 +73,7 @@ Laminar::Laminar() {
archiveUrl = ARCHIVE_URL_DEFAULT;
if(char* envArchive = getenv("LAMINAR_ARCHIVE_URL"))
archiveUrl = envArchive;
eraseWorkdir = true;
eraseRunDir = true;
homeDir = getenv("LAMINAR_HOME") ?: "/var/lib/laminar";
db = new Database((fs::path(homeDir)/"laminar.sqlite").string().c_str());
@@ -370,8 +370,8 @@ void Laminar::stop() {
}
bool Laminar::loadConfiguration() {
if(getenv("LAMINAR_KEEP_WORKDIR"))
eraseWorkdir = false;
if(getenv("LAMINAR_KEEP_RUNDIR"))
eraseRunDir = false;
NodeMap nm;
@@ -726,7 +726,8 @@ void Laminar::runFinished(Run * r) {
}
// remove the rundir
fs::remove_all(r->runDir);
if(eraseRunDir)
fs::remove_all(r->runDir);
// will delete the job
activeJobs.get<2>().erase(r);

View File

@@ -85,7 +85,7 @@ private:
std::string homeDir;
std::set<LaminarClient*> clients;
std::set<LaminarWaiter*> waiters;
bool eraseWorkdir;
bool eraseRunDir;
std::string archiveUrl;
};