]> git.ipfire.org Git - pakfire.git/commitdiff
job: Always stream logs
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 27 Mar 2025 10:33:04 +0000 (10:33 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 27 Mar 2025 10:33:04 +0000 (10:33 +0000)
This was too fragile before and I think we should be able to afford the
stupid traffic...

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/job.c

index 78f4c9e2e22f0cc6a158d656a19eb71f8c6eee12..7dc7dc7e6c19e84b3193567e290804298329515b 100644 (file)
@@ -69,7 +69,6 @@ struct pakfire_job {
        enum {
                PAKFIRE_JOB_TEST       = (1 << 0),
                PAKFIRE_JOB_CCACHE     = (1 << 1),
-               PAKFIRE_JOB_STREAM_LOG = (1 << 2),
        } flags;
 
        // Package URL
@@ -837,10 +836,6 @@ int pakfire_job_stream_logs(struct pakfire_job* self) {
        int priority;
        int r;
 
-       // Don't do this if not enabled
-       if (!pakfire_job_has_flag(self, PAKFIRE_JOB_STREAM_LOG))
-               return 0;
-
        // Try to dequeue a line from the log buffer
        r = pakfire_log_buffer_dequeue(self->log.buffer, &timestamp, &priority, &line, &length);
        if (r < 0) {
@@ -976,14 +971,6 @@ int pakfire_job_handle_message(struct pakfire_job* self, struct json_object* mes
                return r;
        }
 
-       // Launch log stream
-       if (pakfire_string_equals(command, "launch-log-stream"))
-               self->flags |= PAKFIRE_JOB_STREAM_LOG;
-
-       // Terminate log stream
-       else if (pakfire_string_equals(command, "terminate-log-stream"))
-               self->flags &= ~PAKFIRE_JOB_STREAM_LOG;
-
        // Abort job
        if (pakfire_string_equals(command, "abort"))
                return pakfire_job_terminate(self, SIGTERM);