aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/storage.c
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-07-09 15:53:11 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-07-09 17:37:44 +0200
commit0600cacfadf00e916340f2394f1d3bfc173a3d0b (patch)
tree4b1900b096de3d2b3ad49094e86adc310ec79dac /src/storage.c
parenttest: attempt to fix random port selection again (diff)
downloadcimple-0600cacfadf00e916340f2394f1d3bfc173a3d0b.tar.gz
cimple-0600cacfadf00e916340f2394f1d3bfc173a3d0b.zip
store process output in SQLite
Diffstat (limited to 'src/storage.c')
-rw-r--r--src/storage.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/storage.c b/src/storage.c
index 5df9843..ebb2ce8 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -7,6 +7,7 @@
#include "storage.h"
#include "log.h"
+#include "process.h"
#include "run_queue.h"
#include "storage_sqlite.h"
@@ -17,7 +18,7 @@ typedef int (*storage_create_t)(struct storage *, const struct storage_settings
typedef void (*storage_destroy_t)(struct storage *);
typedef int (*storage_run_create_t)(struct storage *, const char *repo_url, const char *rev);
-typedef int (*storage_run_finished_t)(struct storage *, int repo_id, int ec);
+typedef int (*storage_run_finished_t)(struct storage *, int repo_id, const struct proc_output *);
typedef int (*storage_get_run_queue_t)(struct storage *, struct run_queue *);
struct storage_api {
@@ -98,12 +99,12 @@ int storage_run_create(struct storage *storage, const char *repo_url, const char
return api->run_create(storage, repo_url, rev);
}
-int storage_run_finished(struct storage *storage, int run_id, int ec)
+int storage_run_finished(struct storage *storage, int run_id, const struct proc_output *output)
{
const struct storage_api *api = get_api(storage->type);
if (!api)
return -1;
- return api->run_finished(storage, run_id, ec);
+ return api->run_finished(storage, run_id, output);
}
int storage_get_run_queue(struct storage *storage, struct run_queue *queue)