Fix bugs with chat_archiver

* Order of arguments matters - option can't be between other positional args and *args
* Messed up the count structure
pull/360/head
Mike Lang 1 year ago
parent 66603bf648
commit 30c1877b36

@ -173,7 +173,7 @@ class Archiver(object):
batches = {}
for channel in self.channels:
open_batches.labels(channel=channel, client=self.name).set_function(
lambda: len(1 for c, t in batches if c == channel)
lambda: len([1 for c, t in batches if c == channel])
)
# Tracks if we've seen the initial ROOMSTATE for each channel we've joined.

@ -544,7 +544,7 @@
[if $.enabled.chat_archiver then "chat_archiver"]: {
image: $.get_image("chat_archiver"),
restart: "always",
command: [$.chat_archiver.user, "/token", "--name", $.localhost] + $.clean_channels,
command: [$.chat_archiver.user, "/token"] + $.clean_channels + ["--name", $.localhost],
volumes: ["%s:/mnt" % $.segments_path, "%s:/token" % $.chat_archiver.token_path],
[if "chat_archiver" in $.ports then "ports"]: ["%s:8008" % $.ports.chat_archiver],
environment: $.env,

Loading…
Cancel
Save