mirror of
https://github.com/simon987/sist2.git
synced 2025-12-20 10:36:00 +00:00
Compare commits
4 Commits
760fc5093e
...
fix/index-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e57fdc1fe8 | ||
|
|
8bb12f8ae2 | ||
|
|
670dad185e | ||
|
|
bbbd727e6a |
@@ -89,7 +89,7 @@ target_include_directories(
|
|||||||
target_compile_options(
|
target_compile_options(
|
||||||
sist2
|
sist2
|
||||||
PRIVATE
|
PRIVATE
|
||||||
-fPIC
|
# -fPIC
|
||||||
)
|
)
|
||||||
|
|
||||||
if (SIST_DEBUG)
|
if (SIST_DEBUG)
|
||||||
@@ -147,7 +147,7 @@ add_dependencies(
|
|||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
sist2
|
sist2
|
||||||
|
|
||||||
m
|
# m
|
||||||
z
|
z
|
||||||
argparse
|
argparse
|
||||||
unofficial::mongoose::mongoose
|
unofficial::mongoose::mongoose
|
||||||
|
|||||||
@@ -43,11 +43,13 @@ services:
|
|||||||
image: elasticsearch:7.17.9
|
image: elasticsearch:7.17.9
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
# This directory must have 1000:1000 permissions
|
# This directory must have 1000:1000 permissions (or update PUID & PGID below)
|
||||||
- /data/sist2-es-data/:/usr/share/elasticsearch/data
|
- /data/sist2-es-data/:/usr/share/elasticsearch/data
|
||||||
environment:
|
environment:
|
||||||
- "discovery.type=single-node"
|
- "discovery.type=single-node"
|
||||||
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
|
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
|
||||||
|
- "PUID=1000"
|
||||||
|
- "PGID=1000"
|
||||||
sist2-admin:
|
sist2-admin:
|
||||||
image: sist2app/sist2:x64-linux
|
image: sist2app/sist2:x64-linux
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|||||||
@@ -5,11 +5,13 @@ services:
|
|||||||
image: elasticsearch:7.17.9
|
image: elasticsearch:7.17.9
|
||||||
container_name: sist2-es
|
container_name: sist2-es
|
||||||
volumes:
|
volumes:
|
||||||
# This directory must have 1000:1000 permissions
|
# This directory must have 1000:1000 permissions (or update PUID & PGID below)
|
||||||
- /data/sist2-es-data/:/usr/share/elasticsearch/data
|
- /data/sist2-es-data/:/usr/share/elasticsearch/data
|
||||||
environment:
|
environment:
|
||||||
- "discovery.type=single-node"
|
- "discovery.type=single-node"
|
||||||
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
|
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
|
||||||
|
- "PUID=1000"
|
||||||
|
- "PGID=1000"
|
||||||
sist2-admin:
|
sist2-admin:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ uvicorn
|
|||||||
websockets
|
websockets
|
||||||
pycron
|
pycron
|
||||||
GitPython
|
GitPython
|
||||||
git+https://github.com/sist2app/sist2-python.git
|
git+https://github.com/sist2app/sist2-python.git@2.1
|
||||||
@@ -220,7 +220,7 @@ class Sist2IndexTask(Sist2Task):
|
|||||||
except ProcessLookupError:
|
except ProcessLookupError:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
os.wait()
|
os.waitpid(pid, 0)
|
||||||
except ChildProcessError:
|
except ChildProcessError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ void save_current_job_info(sqlite3_context *ctx, int argc, sqlite3_value **argv)
|
|||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
strcpy(buf, current_job);
|
strcpy(buf, current_job);
|
||||||
|
|
||||||
strcpy(ipc_ctx->current_job[ProcData.thread_id], current_job);
|
SET_CURRENT_JOB(ipc_ctx, current_job);
|
||||||
|
|
||||||
sqlite3_result_text(ctx, "ok", -1, SQLITE_STATIC);
|
sqlite3_result_text(ctx, "ok", -1, SQLITE_STATIC);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ typedef struct {
|
|||||||
char current_job[MAX_THREADS][PATH_MAX * 2];
|
char current_job[MAX_THREADS][PATH_MAX * 2];
|
||||||
} database_ipc_ctx_t;
|
} database_ipc_ctx_t;
|
||||||
|
|
||||||
|
#define SET_CURRENT_JOB(ctx, job) (strcpy((ctx)->current_job[ProcData.thread_id], job))
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
double date_min;
|
double date_min;
|
||||||
double date_max;
|
double date_max;
|
||||||
|
|||||||
@@ -142,6 +142,10 @@ void parse(parse_job_t *job) {
|
|||||||
job->vfile.calculate_checksum = ScanCtx.calculate_checksums;
|
job->vfile.calculate_checksum = ScanCtx.calculate_checksums;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IS_SUB_JOB(job)) {
|
||||||
|
SET_CURRENT_JOB(ProcData.ipc_db->ipc_ctx, job->filepath);
|
||||||
|
}
|
||||||
|
|
||||||
document_t *doc = malloc(sizeof(document_t));
|
document_t *doc = malloc(sizeof(document_t));
|
||||||
|
|
||||||
strcpy(doc->filepath, job->filepath);
|
strcpy(doc->filepath, job->filepath);
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
static const char *const Version = VERSION;
|
static const char *const Version = VERSION;
|
||||||
static const int VersionMajor = 3;
|
static const int VersionMajor = 3;
|
||||||
static const int VersionMinor = 4;
|
static const int VersionMinor = 4;
|
||||||
static const int VersionPatch = 3;
|
static const int VersionPatch = 4;
|
||||||
|
|
||||||
#ifndef SIST_PLATFORM
|
#ifndef SIST_PLATFORM
|
||||||
#define SIST_PLATFORM unknown
|
#define SIST_PLATFORM unknown
|
||||||
|
|||||||
2
third-party/libscan/libscan/scan.h
vendored
2
third-party/libscan/libscan/scan.h
vendored
@@ -172,6 +172,8 @@ typedef struct {
|
|||||||
char filepath[PATH_MAX * 2 + 1];
|
char filepath[PATH_MAX * 2 + 1];
|
||||||
} parse_job_t;
|
} parse_job_t;
|
||||||
|
|
||||||
|
#define IS_SUB_JOB(job) ((job)->parent[0] != '\0')
|
||||||
|
|
||||||
|
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user