cabana: set the COMMA_CACHE environment variable (#29849)

* set COMMA_CACHE enviroment

* use /tmp/comma_donwloand_cache
pull/30319/head
Dean Lee 2 years ago committed by GitHub
parent 412f4cbc1a
commit 0431bbaa8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      tools/cabana/streams/replaystream.cc

@ -8,10 +8,13 @@
ReplayStream::ReplayStream(QObject *parent) : AbstractStream(parent) { ReplayStream::ReplayStream(QObject *parent) : AbstractStream(parent) {
unsetenv("ZMQ"); unsetenv("ZMQ");
setenv("COMMA_CACHE", "/tmp/comma_download_cache", 1);
// TODO: Remove when OpenpilotPrefix supports ZMQ // TODO: Remove when OpenpilotPrefix supports ZMQ
#ifndef __APPLE__ #ifndef __APPLE__
op_prefix = std::make_unique<OpenpilotPrefix>(); op_prefix = std::make_unique<OpenpilotPrefix>();
#endif #endif
QObject::connect(&settings, &Settings::changed, [this]() { QObject::connect(&settings, &Settings::changed, [this]() {
if (replay) replay->setSegmentCacheLimit(settings.max_cached_minutes); if (replay) replay->setSegmentCacheLimit(settings.max_cached_minutes);
}); });

Loading…
Cancel
Save