More logging
This commit is contained in:
parent
a27f7457aa
commit
3a617f9291
1 changed files with 4 additions and 3 deletions
|
@ -109,7 +109,7 @@ async function getStatus(entry: Service, containers: Dockerode.ContainerInfo[])
|
||||||
else if (entry.type === ServiceType.docker) {
|
else if (entry.type === ServiceType.docker) {
|
||||||
containers.forEach((container) => {
|
containers.forEach((container) => {
|
||||||
// Docker API returns container names with / prepended
|
// Docker API returns container names with / prepended
|
||||||
if (container.Names.includes( "/" + entry.docker_container_name)) {
|
if (container.Names.includes("/" + entry.docker_container_name)) {
|
||||||
// so far only "running" is properly implemented, mroe cases to follow as needed
|
// so far only "running" is properly implemented, mroe cases to follow as needed
|
||||||
switch (container.State) {
|
switch (container.State) {
|
||||||
case "running":
|
case "running":
|
||||||
|
@ -123,8 +123,9 @@ async function getStatus(entry: Service, containers: Dockerode.ContainerInfo[])
|
||||||
// If container name is not missing the container is set to offline
|
// If container name is not missing the container is set to offline
|
||||||
else if (entry.docker_container_name !== null) {
|
else if (entry.docker_container_name !== null) {
|
||||||
// DEBUG
|
// DEBUG
|
||||||
console.log(entry.docker_container_name);
|
console.log(container.Names.includes("/" + entry.docker_container_name))
|
||||||
console.log(container.Names);
|
console.log("/" + entry.docker_container_name);
|
||||||
|
console.log(container.Names[0]);
|
||||||
// DEBUG
|
// DEBUG
|
||||||
console.warn("Container for " + entry.name + " could not be found");
|
console.warn("Container for " + entry.name + " could not be found");
|
||||||
entry.status = ServiceStatus.offline;
|
entry.status = ServiceStatus.offline;
|
||||||
|
|
Loading…
Reference in a new issue