wadoku/main.star

49 lines
1.4 KiB
Plaintext
Raw Normal View History

2023-01-11 15:07:25 +05:30
DEFAULT_CONFIG_FILE = "github.com/logos-co/wadoku/waku/config.json"
2023-01-11 12:27:40 +05:30
def get_config_file(args):
return DEFAULT_CONFIG_FILE if not hasattr(args, "config") else args.config
def run(args):
print(args)
config_file = get_config_file(args)
print("Reading the config from: %s" %config_file)
config_json = read_file(src=config_file)
config = json.decode(config_json)
#input_file = config['input_file']
output_file = config['output_file']
duration = config['duration']
iat = config['iat']
2023-01-14 01:10:43 +05:30
loglvl = config['log_level']
ctopic = config['content_topic']
2023-01-11 12:27:40 +05:30
print(config)
waku_filtr = add_service(
service_id = "waku-filter",
config = struct(
image = "waku-filter:alpha",
entrypoint= ["/go/bin/waku-filter"],
2023-01-11 15:07:25 +05:30
cmd = [ "-o=" + "/go/bin/out/filter.out",
"-d=" + duration,
2023-01-14 01:10:43 +05:30
"-c=" + ctopic,
"-l=" + loglvl,
2023-01-11 12:27:40 +05:30
"-i=" + iat ],
),
)
waku_lpush = add_service(
service_id = "waku-lightpush",
config = struct(
image = "waku-lightpush:alpha",
entrypoint= ["/go/bin/waku-lightpush"],
cmd = [ "-o=" + "/go/bin/out/lightpush.out",
2023-01-11 15:07:25 +05:30
"-d=" + duration,
2023-01-14 01:10:43 +05:30
"-c=" + ctopic,
"-l=" + loglvl,
2023-01-11 12:27:40 +05:30
"-i=" + iat ],
),
)
print(waku_filtr, waku_lpush)