#!/usr/bin/env -S v -n -w -cg -gc none -cc tcc -d use_openssl -enable-globals run import time import herocode.runner import freeflowuniverse.herolib.core.redisclient const namespace = 'example' mut r := &runner.Runner{ name: 'example_runner' namespace: namespace client: &runner.Client{ redis_conn: redisclient.new('127.0.0.1:6379')! } } spawn r.run() job := runner.Job{ id: 'test_job_1' caller_id: 'test_caller' context_id: 'test_context_1' runner: 'test_runner' executor: 'tmux.session1' payload: '!!git.list' status: .dispatched timeout: 30 created_at: time.now() updated_at: time.now() } mut client := runner.Client{ redis_conn: redisclient.new('127.0.0.1:6379')! } client.store_in_redis(job.id, job)! mut runner_q := client.redis_conn.queue_get(r.queue_key()!) runner_q.add(job.id)! for {}