graph: allow graphs to be auto-collected (controlled via yb_graph_auto_collect_db)

By default it's off, but it's allow bot to scan graph directory, do a diff with a graph db server and upload every single graph file that do not exist in central database. This is done in a separate thread and do not block server process, and only once server/game is started, not on change level. Also, it's not working on currently started map.
This commit is contained in:
jeefo 2024-01-30 14:37:14 +03:00
commit 46ebbeea57
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
8 changed files with 200 additions and 11 deletions

View file

@ -168,6 +168,7 @@ private:
bool m_narrowChecked {};
bool m_silenceMessages {};
bool m_lightChecked {};
bool m_isOnlineCollected {};
Vector m_learnVelocity {};
Vector m_learnPosition {};
@ -259,6 +260,8 @@ public:
void showStats ();
void showFileInfo ();
void emitNotify (int32_t sound);
void syncCollectOnline ();
void collectOnline ();
IntArray getNearestInRadius (float radius, const Vector &origin, int maxCount = -1);
const IntArray &getNodesInBucket (const Vector &pos);

View file

@ -40,6 +40,7 @@ public:
static constexpr StringRef url { "https://yapb.jeefo.net/" };
static constexpr StringRef download { "yapb.jeefo.net" };
static constexpr StringRef upload { "yapb.jeefo.net/upload" };
static constexpr StringRef httpScheme { "http" };
static constexpr StringRef logtag { "YB" };
static constexpr StringRef dtime { __DATE__ " " __TIME__ };
static constexpr StringRef date { __DATE__ };

View file

@ -76,7 +76,7 @@ public:
template <typename ...Args> bool error (bool isGraph, bool isDebug, MemFile &file, const char *fmt, Args &&...args);
// builds the filename to requested filename
String buildPath (int32_t type, bool isMemoryLoad = false);
String buildPath (int32_t type, bool isMemoryLoad = false, bool withoutMapName = false);
// get's relative path against bot library (bot library should reside in bin dir)
StringRef getRunningPath ();