NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Trace

data/Dockerfiles/dockerapi/main.py

Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.

main.py on main
Author Date Commit Line Code
FreddleSpl0it about 3 years ago 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
1
import os
Open commit View diff
1 import os
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
2
import sys
Open commit View diff
2 import sys
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
3
import uvicorn
Open commit View diff
3 import uvicorn
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
4
import json
Open commit View diff
4 import json
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
5
import uuid
Open commit View diff
5 import uuid
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
6
import async_timeout
Open commit View diff
6 import async_timeout
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
7
import asyncio
Open commit View diff
7 import asyncio
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
8
import aiodocker
Open commit View diff
8 import aiodocker
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
9
import docker
Open commit View diff
9 import docker
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
10
import logging
Open commit View diff
10 import logging
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
11
from logging.config import dictConfig
Open commit View diff
11 from logging.config import dictConfig
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
12
from fastapi import FastAPI, Response, Request
Open commit View diff
12 from fastapi import FastAPI, Response, Request
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
13
from modules.DockerApi import DockerApi
Open commit View diff
13 from modules.DockerApi import DockerApi
DerLinkman over 2 years ago 333b7eb

Fix Alpine 3.19 dependencies

Full commit hash
333b7ebc0cadfedbf2393eddac4ebc79cae6b187
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
14
from redis import asyncio as aioredis
Open commit View diff
14 from redis import asyncio as aioredis
DerLinkman over 2 years ago 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
15
from contextlib import asynccontextmanager
Open commit View diff
15 from contextlib import asynccontextmanager
FreddleSpl0it about 3 years ago 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
16
Open commit View diff
16
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
17
dockerapi = None
Open commit View diff
17 dockerapi = None
DerLinkman over 2 years ago 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
18
Open commit View diff
18
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
19
@asynccontextmanager
Open commit View diff
19 @asynccontextmanager
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
20
async def lifespan(app: FastAPI):
Open commit View diff
20 async def lifespan(app: FastAPI):
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
21
  global dockerapi
Open commit View diff
21 global dockerapi
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
22
Open commit View diff
22
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
23
  # Initialize a custom logger
Open commit View diff
23 # Initialize a custom logger
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
24
  logger = logging.getLogger("dockerapi")
Open commit View diff
24 logger = logging.getLogger("dockerapi")
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
25
  logger.setLevel(logging.INFO)
Open commit View diff
25 logger.setLevel(logging.INFO)
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
26
  # Configure the logger to output logs to the terminal
Open commit View diff
26 # Configure the logger to output logs to the terminal
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
27
  handler = logging.StreamHandler()
Open commit View diff
27 handler = logging.StreamHandler()
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
28
  handler.setLevel(logging.INFO)
Open commit View diff
28 handler.setLevel(logging.INFO)
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
29
  formatter = logging.Formatter("%(levelname)s:     %(message)s")
Open commit View diff
29 formatter = logging.Formatter("%(levelname)s: %(message)s")
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
30
  handler.setFormatter(formatter)
Open commit View diff
30 handler.setFormatter(formatter)
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
31
  logger.addHandler(handler)
Open commit View diff
31 logger.addHandler(handler)
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
32
Open commit View diff
32
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
33
  logger.info("Init APP")
Open commit View diff
33 logger.info("Init APP")
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
34
Open commit View diff
34
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
35
  # Init redis client
Open commit View diff
35 # Init redis client
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
36
  if os.environ['REDIS_SLAVEOF_IP'] != "":
Open commit View diff
36 if os.environ['REDIS_SLAVEOF_IP'] != "":
FreddleSpl0it over 1 year ago 89fb132

Enable password protection for Redis

Full commit hash
89fb1322c6f486a9883e6435a73537b13fbf3582
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
37
    redis_client = redis = await aioredis.from_url(f"redis://{os.environ['REDIS_SLAVEOF_IP']}:{os.environ['REDIS_SLAVEOF_PORT']}/0", password=os.environ['REDISPASS'])
Open commit View diff
37 redis_client = redis = await aioredis.from_url(f"redis://{os.environ['REDIS_SLAVEOF_IP']}:{os.environ['REDIS_SLAVEOF_PORT']}/0", password=os.environ['REDISPASS'])
DerLinkman over 2 years ago 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
38
  else:
Open commit View diff
38 else:
FreddleSpl0it over 1 year ago 89fb132

Enable password protection for Redis

Full commit hash
89fb1322c6f486a9883e6435a73537b13fbf3582
Author
FreddleSpl0it <[email protected]>
Date
over 1 year ago
Selected line
39
    redis_client = redis = await aioredis.from_url("redis://redis-mailcow:6379/0", password=os.environ['REDISPASS'])
Open commit View diff
39 redis_client = redis = await aioredis.from_url("redis://redis-mailcow:6379/0", password=os.environ['REDISPASS'])
DerLinkman over 2 years ago 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
40
Open commit View diff
40
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
41
  # Init docker clients
Open commit View diff
41 # Init docker clients
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
42
  sync_docker_client = docker.DockerClient(base_url='unix://var/run/docker.sock', version='auto')
Open commit View diff
42 sync_docker_client = docker.DockerClient(base_url='unix://var/run/docker.sock', version='auto')
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
43
  async_docker_client = aiodocker.Docker(url='unix:///var/run/docker.sock')
Open commit View diff
43 async_docker_client = aiodocker.Docker(url='unix:///var/run/docker.sock')
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
44
Open commit View diff
44
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
45
  dockerapi = DockerApi(redis_client, sync_docker_client, async_docker_client, logger)
Open commit View diff
45 dockerapi = DockerApi(redis_client, sync_docker_client, async_docker_client, logger)
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
46
Open commit View diff
46
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
47
  logger.info("Subscribe to redis channel")
Open commit View diff
47 logger.info("Subscribe to redis channel")
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
48
  # Subscribe to redis channel
Open commit View diff
48 # Subscribe to redis channel
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
49
  dockerapi.pubsub = redis.pubsub()
Open commit View diff
49 dockerapi.pubsub = redis.pubsub()
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
50
  await dockerapi.pubsub.subscribe("MC_CHANNEL")
Open commit View diff
50 await dockerapi.pubsub.subscribe("MC_CHANNEL")
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
51
  asyncio.create_task(handle_pubsub_messages(dockerapi.pubsub))
Open commit View diff
51 asyncio.create_task(handle_pubsub_messages(dockerapi.pubsub))
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
52
Open commit View diff
52
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
53
Open commit View diff
53
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
54
  yield
Open commit View diff
54 yield
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
55
Open commit View diff
55
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
56
  # Close docker connections
Open commit View diff
56 # Close docker connections
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
57
  dockerapi.sync_docker_client.close()
Open commit View diff
57 dockerapi.sync_docker_client.close()
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
58
  await dockerapi.async_docker_client.close()
Open commit View diff
58 await dockerapi.async_docker_client.close()
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
59
Open commit View diff
59
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
60
  # Close redis
Open commit View diff
60 # Close redis
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
61
  await dockerapi.pubsub.unsubscribe("MC_CHANNEL")
Open commit View diff
61 await dockerapi.pubsub.unsubscribe("MC_CHANNEL")
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
62
  await dockerapi.redis_client.close()
Open commit View diff
62 await dockerapi.redis_client.close()
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
63
Open commit View diff
63
same change 25007b1

dockerapi: implemented lifespan function

Full commit hash
25007b19633a3ae121981206854fb3dc1e9e86a8
Author
DerLinkman <[email protected]>
Date
over 2 years ago
Selected line
64
app = FastAPI(lifespan=lifespan)
Open commit View diff
64 app = FastAPI(lifespan=lifespan)
FreddleSpl0it about 3 years ago 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
65
Open commit View diff
65
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
66
# Define Routes
Open commit View diff
66 # Define Routes
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
67
@app.get("/host/stats")
Open commit View diff
67 @app.get("/host/stats")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
68
async def get_host_update_stats():
Open commit View diff
68 async def get_host_update_stats():
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
69
  global dockerapi
Open commit View diff
69 global dockerapi
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
70
Open commit View diff
70
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
71
  if dockerapi.host_stats_isUpdating == False:
Open commit View diff
71 if dockerapi.host_stats_isUpdating == False:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
72
    asyncio.create_task(dockerapi.get_host_stats())
Open commit View diff
72 asyncio.create_task(dockerapi.get_host_stats())
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
73
    dockerapi.host_stats_isUpdating = True
Open commit View diff
73 dockerapi.host_stats_isUpdating = True
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
74
Open commit View diff
74
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
75
  while True:
Open commit View diff
75 while True:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
76
    if await dockerapi.redis_client.exists('host_stats'):
Open commit View diff
76 if await dockerapi.redis_client.exists('host_stats'):
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
77
      break
Open commit View diff
77 break
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
78
    await asyncio.sleep(1.5)
Open commit View diff
78 await asyncio.sleep(1.5)
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
79
Open commit View diff
79
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
80
  stats = json.loads(await dockerapi.redis_client.get('host_stats'))
Open commit View diff
80 stats = json.loads(await dockerapi.redis_client.get('host_stats'))
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
81
  return Response(content=json.dumps(stats, indent=4), media_type="application/json")
Open commit View diff
81 return Response(content=json.dumps(stats, indent=4), media_type="application/json")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
82
Open commit View diff
82
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
83
@app.get("/containers/{container_id}/json")
Open commit View diff
83 @app.get("/containers/{container_id}/json")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
84
async def get_container(container_id : str):
Open commit View diff
84 async def get_container(container_id : str):
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
85
  global dockerapi
Open commit View diff
85 global dockerapi
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
86
Open commit View diff
86
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
87
  if container_id and container_id.isalnum():
Open commit View diff
87 if container_id and container_id.isalnum():
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
88
    try:
Open commit View diff
88 try:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
89
      for container in (await dockerapi.async_docker_client.containers.list()):
Open commit View diff
89 for container in (await dockerapi.async_docker_client.containers.list()):
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
90
        if container._id == container_id:
Open commit View diff
90 if container._id == container_id:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
91
          container_info = await container.show()
Open commit View diff
91 container_info = await container.show()
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
92
          return Response(content=json.dumps(container_info, indent=4), media_type="application/json")
Open commit View diff
92 return Response(content=json.dumps(container_info, indent=4), media_type="application/json")
FreddleSpl0it almost 2 years ago be5a181

[Web][DockerApi] migrate imap acl on mbox rename

Full commit hash
be5a181be5b4717c080faf05e47965e8273ea9ea
Author
FreddleSpl0it <[email protected]>
Date
almost 2 years ago
Selected line
93
Open commit View diff
93
FreddleSpl0it about 3 years ago 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
94
      res = {
Open commit View diff
94 res = {
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
95
        "type": "danger",
Open commit View diff
95 "type": "danger",
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
96
        "msg": "no container found"
Open commit View diff
96 "msg": "no container found"
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
97
      }
Open commit View diff
97 }
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
98
      return Response(content=json.dumps(res, indent=4), media_type="application/json")
Open commit View diff
98 return Response(content=json.dumps(res, indent=4), media_type="application/json")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
99
    except Exception as e:
Open commit View diff
99 except Exception as e:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
100
      res = {
Open commit View diff
100 res = {
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
101
        "type": "danger",
Open commit View diff
101 "type": "danger",
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
102
        "msg": str(e)
Open commit View diff
102 "msg": str(e)
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
103
      }
Open commit View diff
103 }
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
104
      return Response(content=json.dumps(res, indent=4), media_type="application/json")
Open commit View diff
104 return Response(content=json.dumps(res, indent=4), media_type="application/json")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
105
  else:
Open commit View diff
105 else:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
106
    res = {
Open commit View diff
106 res = {
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
107
      "type": "danger",
Open commit View diff
107 "type": "danger",
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
108
      "msg": "no or invalid id defined"
Open commit View diff
108 "msg": "no or invalid id defined"
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
109
    }
Open commit View diff
109 }
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
110
    return Response(content=json.dumps(res, indent=4), media_type="application/json")
Open commit View diff
110 return Response(content=json.dumps(res, indent=4), media_type="application/json")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
111
Open commit View diff
111
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
112
@app.get("/containers/json")
Open commit View diff
112 @app.get("/containers/json")
Jérémie Crinon 5 months ago 99dc0f6

fix: show stopped and failed containers in dashboard and API

Full commit hash
99dc0f6616dec4ff629898721d2db663e6bf66fa
Author
Jérémie Crinon <[email protected]>
Date
5 months ago
Selected line
113
async def get_containers(all: bool = False):
Open commit View diff
113 async def get_containers(all: bool = False):
FreddleSpl0it about 3 years ago 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
114
  global dockerapi
Open commit View diff
114 global dockerapi
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
115
Open commit View diff
115
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
116
  containers = {}
Open commit View diff
116 containers = {}
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
117
  try:
Open commit View diff
117 try:
Jérémie Crinon 5 months ago 99dc0f6

fix: show stopped and failed containers in dashboard and API

Full commit hash
99dc0f6616dec4ff629898721d2db663e6bf66fa
Author
Jérémie Crinon <[email protected]>
Date
5 months ago
Selected line
118
    for container in (await dockerapi.async_docker_client.containers.list(all=all)):
Open commit View diff
118 for container in (await dockerapi.async_docker_client.containers.list(all=all)):
FreddleSpl0it about 3 years ago 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
119
      container_info = await container.show()
Open commit View diff
119 container_info = await container.show()
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
120
      containers.update({container_info['Id']: container_info})
Open commit View diff
120 containers.update({container_info['Id']: container_info})
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
121
    return Response(content=json.dumps(containers, indent=4), media_type="application/json")
Open commit View diff
121 return Response(content=json.dumps(containers, indent=4), media_type="application/json")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
122
  except Exception as e:
Open commit View diff
122 except Exception as e:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
123
    res = {
Open commit View diff
123 res = {
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
124
      "type": "danger",
Open commit View diff
124 "type": "danger",
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
125
      "msg": str(e)
Open commit View diff
125 "msg": str(e)
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
126
    }
Open commit View diff
126 }
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
127
    return Response(content=json.dumps(res, indent=4), media_type="application/json")
Open commit View diff
127 return Response(content=json.dumps(res, indent=4), media_type="application/json")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
128
Open commit View diff
128
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
129
@app.post("/containers/{container_id}/{post_action}")
Open commit View diff
129 @app.post("/containers/{container_id}/{post_action}")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
130
async def post_containers(container_id : str, post_action : str, request: Request):
Open commit View diff
130 async def post_containers(container_id : str, post_action : str, request: Request):
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
131
  global dockerapi
Open commit View diff
131 global dockerapi
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
132
Open commit View diff
132
FreddleSpl0it almost 2 years ago be5a181

[Web][DockerApi] migrate imap acl on mbox rename

Full commit hash
be5a181be5b4717c080faf05e47965e8273ea9ea
Author
FreddleSpl0it <[email protected]>
Date
almost 2 years ago
Selected line
133
  try:
Open commit View diff
133 try:
FreddleSpl0it about 3 years ago 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
134
    request_json = await request.json()
Open commit View diff
134 request_json = await request.json()
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
135
  except Exception as err:
Open commit View diff
135 except Exception as err:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
136
    request_json = {}
Open commit View diff
136 request_json = {}
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
137
Open commit View diff
137
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
138
  if container_id and container_id.isalnum() and post_action:
Open commit View diff
138 if container_id and container_id.isalnum() and post_action:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
139
    try:
Open commit View diff
139 try:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
140
      """Dispatch container_post api call"""
Open commit View diff
140 """Dispatch container_post api call"""
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
141
      if post_action == 'exec':
Open commit View diff
141 if post_action == 'exec':
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
142
        if not request_json or not 'cmd' in request_json:
Open commit View diff
142 if not request_json or not 'cmd' in request_json:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
143
          res = {
Open commit View diff
143 res = {
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
144
            "type": "danger",
Open commit View diff
144 "type": "danger",
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
145
            "msg": "cmd is missing"
Open commit View diff
145 "msg": "cmd is missing"
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
146
          }
Open commit View diff
146 }
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
147
          return Response(content=json.dumps(res, indent=4), media_type="application/json")
Open commit View diff
147 return Response(content=json.dumps(res, indent=4), media_type="application/json")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
148
        if not request_json or not 'task' in request_json:
Open commit View diff
148 if not request_json or not 'task' in request_json:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
149
          res = {
Open commit View diff
149 res = {
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
150
            "type": "danger",
Open commit View diff
150 "type": "danger",
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
151
            "msg": "task is missing"
Open commit View diff
151 "msg": "task is missing"
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
152
          }
Open commit View diff
152 }
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
153
          return Response(content=json.dumps(res, indent=4), media_type="application/json")
Open commit View diff
153 return Response(content=json.dumps(res, indent=4), media_type="application/json")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
154
Open commit View diff
154
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
155
        api_call_method_name = '__'.join(['container_post', str(post_action), str(request_json['cmd']), str(request_json['task']) ])
Open commit View diff
155 api_call_method_name = '__'.join(['container_post', str(post_action), str(request_json['cmd']), str(request_json['task']) ])
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
156
      else:
Open commit View diff
156 else:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
157
        api_call_method_name = '__'.join(['container_post', str(post_action) ])
Open commit View diff
157 api_call_method_name = '__'.join(['container_post', str(post_action) ])
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
158
Open commit View diff
158
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
159
      api_call_method = getattr(dockerapi, api_call_method_name, lambda container_id: Response(content=json.dumps({'type': 'danger', 'msg':'container_post - unknown api call' }, indent=4), media_type="application/json"))
Open commit View diff
159 api_call_method = getattr(dockerapi, api_call_method_name, lambda container_id: Response(content=json.dumps({'type': 'danger', 'msg':'container_post - unknown api call' }, indent=4), media_type="application/json"))
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
160
Open commit View diff
160
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
161
      dockerapi.logger.info("api call: %s, container_id: %s" % (api_call_method_name, container_id))
Open commit View diff
161 dockerapi.logger.info("api call: %s, container_id: %s" % (api_call_method_name, container_id))
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
162
      return api_call_method(request_json, container_id=container_id)
Open commit View diff
162 return api_call_method(request_json, container_id=container_id)
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
163
    except Exception as e:
Open commit View diff
163 except Exception as e:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
164
      dockerapi.logger.error("error - container_post: %s" % str(e))
Open commit View diff
164 dockerapi.logger.error("error - container_post: %s" % str(e))
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
165
      res = {
Open commit View diff
165 res = {
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
166
        "type": "danger",
Open commit View diff
166 "type": "danger",
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
167
        "msg": str(e)
Open commit View diff
167 "msg": str(e)
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
168
      }
Open commit View diff
168 }
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
169
      return Response(content=json.dumps(res, indent=4), media_type="application/json")
Open commit View diff
169 return Response(content=json.dumps(res, indent=4), media_type="application/json")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
170
Open commit View diff
170
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
171
  else:
Open commit View diff
171 else:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
172
    res = {
Open commit View diff
172 res = {
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
173
      "type": "danger",
Open commit View diff
173 "type": "danger",
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
174
      "msg": "invalid container id or missing action"
Open commit View diff
174 "msg": "invalid container id or missing action"
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
175
    }
Open commit View diff
175 }
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
176
    return Response(content=json.dumps(res, indent=4), media_type="application/json")
Open commit View diff
176 return Response(content=json.dumps(res, indent=4), media_type="application/json")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
177
Open commit View diff
177
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
178
@app.post("/container/{container_id}/stats/update")
Open commit View diff
178 @app.post("/container/{container_id}/stats/update")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
179
async def post_container_update_stats(container_id : str):
Open commit View diff
179 async def post_container_update_stats(container_id : str):
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
180
  global dockerapi
Open commit View diff
180 global dockerapi
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
181
Open commit View diff
181
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
182
  # start update task for container if no task is running
Open commit View diff
182 # start update task for container if no task is running
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
183
  if container_id not in dockerapi.containerIds_to_update:
Open commit View diff
183 if container_id not in dockerapi.containerIds_to_update:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
184
    asyncio.create_task(dockerapi.get_container_stats(container_id))
Open commit View diff
184 asyncio.create_task(dockerapi.get_container_stats(container_id))
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
185
    dockerapi.containerIds_to_update.append(container_id)
Open commit View diff
185 dockerapi.containerIds_to_update.append(container_id)
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
186
Open commit View diff
186
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
187
  while True:
Open commit View diff
187 while True:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
188
    if await dockerapi.redis_client.exists(container_id + '_stats'):
Open commit View diff
188 if await dockerapi.redis_client.exists(container_id + '_stats'):
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
189
      break
Open commit View diff
189 break
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
190
    await asyncio.sleep(1.5)
Open commit View diff
190 await asyncio.sleep(1.5)
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
191
Open commit View diff
191
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
192
  stats = json.loads(await dockerapi.redis_client.get(container_id + '_stats'))
Open commit View diff
192 stats = json.loads(await dockerapi.redis_client.get(container_id + '_stats'))
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
193
  return Response(content=json.dumps(stats, indent=4), media_type="application/json")
Open commit View diff
193 return Response(content=json.dumps(stats, indent=4), media_type="application/json")
FreddleSpl0it almost 2 years ago be5a181

[Web][DockerApi] migrate imap acl on mbox rename

Full commit hash
be5a181be5b4717c080faf05e47965e8273ea9ea
Author
FreddleSpl0it <[email protected]>
Date
almost 2 years ago
Selected line
194
Open commit View diff
194
FreddleSpl0it about 3 years ago 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
195
Open commit View diff
195
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
196
# PubSub Handler
Open commit View diff
196 # PubSub Handler
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
197
async def handle_pubsub_messages(channel: aioredis.client.PubSub):
Open commit View diff
197 async def handle_pubsub_messages(channel: aioredis.client.PubSub):
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
198
  global dockerapi
Open commit View diff
198 global dockerapi
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
199
Open commit View diff
199
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
200
  while True:
Open commit View diff
200 while True:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
201
    try:
Open commit View diff
201 try:
Michael Stilkerich almost 3 years ago 533bd36

Fix CPU load of dockerapi container

Full commit hash
533bd36572dc0e6476425717499f1c2248160ec4
Author
Michael Stilkerich <[email protected]>
Date
almost 3 years ago
Selected line
202
      async with async_timeout.timeout(60):
Open commit View diff
202 async with async_timeout.timeout(60):
same change 533bd36

Fix CPU load of dockerapi container

Full commit hash
533bd36572dc0e6476425717499f1c2248160ec4
Author
Michael Stilkerich <[email protected]>
Date
almost 3 years ago
Selected line
203
        message = await channel.get_message(ignore_subscribe_messages=True, timeout=30)
Open commit View diff
203 message = await channel.get_message(ignore_subscribe_messages=True, timeout=30)
FreddleSpl0it about 3 years ago 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
204
        if message is not None:
Open commit View diff
204 if message is not None:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
205
          # Parse message
Open commit View diff
205 # Parse message
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
206
          data_json = json.loads(message['data'].decode('utf-8'))
Open commit View diff
206 data_json = json.loads(message['data'].decode('utf-8'))
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
207
          dockerapi.logger.info(f"PubSub Received - {json.dumps(data_json)}")
Open commit View diff
207 dockerapi.logger.info(f"PubSub Received - {json.dumps(data_json)}")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
208
Open commit View diff
208
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
209
          # Handle api_call
Open commit View diff
209 # Handle api_call
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
210
          if 'api_call' in data_json:
Open commit View diff
210 if 'api_call' in data_json:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
211
            # api_call: container_post
Open commit View diff
211 # api_call: container_post
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
212
            if data_json['api_call'] == "container_post":
Open commit View diff
212 if data_json['api_call'] == "container_post":
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
213
              if 'post_action' in data_json and 'container_name' in data_json:
Open commit View diff
213 if 'post_action' in data_json and 'container_name' in data_json:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
214
                try:
Open commit View diff
214 try:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
215
                  """Dispatch container_post api call"""
Open commit View diff
215 """Dispatch container_post api call"""
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
216
                  request_json = {}
Open commit View diff
216 request_json = {}
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
217
                  if data_json['post_action'] == 'exec':
Open commit View diff
217 if data_json['post_action'] == 'exec':
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
218
                    if 'request' in data_json:
Open commit View diff
218 if 'request' in data_json:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
219
                      request_json = data_json['request']
Open commit View diff
219 request_json = data_json['request']
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
220
                      if 'cmd' in request_json:
Open commit View diff
220 if 'cmd' in request_json:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
221
                        if 'task' in request_json:
Open commit View diff
221 if 'task' in request_json:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
222
                          api_call_method_name = '__'.join(['container_post', str(data_json['post_action']), str(request_json['cmd']), str(request_json['task']) ])
Open commit View diff
222 api_call_method_name = '__'.join(['container_post', str(data_json['post_action']), str(request_json['cmd']), str(request_json['task']) ])
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
223
                        else:
Open commit View diff
223 else:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
224
                          dockerapi.logger.error("api call: task missing")
Open commit View diff
224 dockerapi.logger.error("api call: task missing")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
225
                      else:
Open commit View diff
225 else:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
226
                        dockerapi.logger.error("api call: cmd missing")
Open commit View diff
226 dockerapi.logger.error("api call: cmd missing")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
227
                    else:
Open commit View diff
227 else:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
228
                      dockerapi.logger.error("api call: request missing")
Open commit View diff
228 dockerapi.logger.error("api call: request missing")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
229
                  else:
Open commit View diff
229 else:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
230
                    api_call_method_name = '__'.join(['container_post', str(data_json['post_action'])])
Open commit View diff
230 api_call_method_name = '__'.join(['container_post', str(data_json['post_action'])])
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
231
Open commit View diff
231
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
232
                  if api_call_method_name:
Open commit View diff
232 if api_call_method_name:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
233
                    api_call_method = getattr(dockerapi, api_call_method_name)
Open commit View diff
233 api_call_method = getattr(dockerapi, api_call_method_name)
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
234
                    if api_call_method:
Open commit View diff
234 if api_call_method:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
235
                      dockerapi.logger.info("api call: %s, container_name: %s" % (api_call_method_name, data_json['container_name']))
Open commit View diff
235 dockerapi.logger.info("api call: %s, container_name: %s" % (api_call_method_name, data_json['container_name']))
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
236
                      api_call_method(request_json, container_name=data_json['container_name'])
Open commit View diff
236 api_call_method(request_json, container_name=data_json['container_name'])
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
237
                    else:
Open commit View diff
237 else:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
238
                      dockerapi.logger.error("api call not found: %s, container_name: %s" % (api_call_method_name, data_json['container_name']))
Open commit View diff
238 dockerapi.logger.error("api call not found: %s, container_name: %s" % (api_call_method_name, data_json['container_name']))
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
239
                except Exception as e:
Open commit View diff
239 except Exception as e:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
240
                  dockerapi.logger.error("container_post: %s" % str(e))
Open commit View diff
240 dockerapi.logger.error("container_post: %s" % str(e))
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
241
              else:
Open commit View diff
241 else:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
242
                dockerapi.logger.error("api call: missing container_name, post_action or request")
Open commit View diff
242 dockerapi.logger.error("api call: missing container_name, post_action or request")
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
243
            else:
Open commit View diff
243 else:
Marvin A. Ruder over 1 year ago 05fc4f7

fix(ui): Swap translations for oversized dropdown

Full commit hash
05fc4f7aba5bfb9e2db596d11d6beab00ae70320
Author
Marvin A. Ruder <[email protected]>
Date
over 1 year ago
Selected line
244
              dockerapi.logger.error("Unknown PubSub received - %s" % json.dumps(data_json))
Open commit View diff
244 dockerapi.logger.error("Unknown PubSub received - %s" % json.dumps(data_json))
FreddleSpl0it about 3 years ago 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
245
          else:
Open commit View diff
245 else:
Marvin A. Ruder over 1 year ago 05fc4f7

fix(ui): Swap translations for oversized dropdown

Full commit hash
05fc4f7aba5bfb9e2db596d11d6beab00ae70320
Author
Marvin A. Ruder <[email protected]>
Date
over 1 year ago
Selected line
246
            dockerapi.logger.error("Unknown PubSub received - %s" % json.dumps(data_json))
Open commit View diff
246 dockerapi.logger.error("Unknown PubSub received - %s" % json.dumps(data_json))
FreddleSpl0it almost 2 years ago be5a181

[Web][DockerApi] migrate imap acl on mbox rename

Full commit hash
be5a181be5b4717c080faf05e47965e8273ea9ea
Author
FreddleSpl0it <[email protected]>
Date
almost 2 years ago
Selected line
247
Open commit View diff
247
Michael Stilkerich almost 3 years ago 930473a

Set asyncio timeout to 0 for yielding

Full commit hash
930473a980051ef1931ae5c4f57bedb24d56745e
Author
Michael Stilkerich <[email protected]>
Date
almost 3 years ago
Selected line
248
        await asyncio.sleep(0.0)
Open commit View diff
248 await asyncio.sleep(0.0)
FreddleSpl0it about 3 years ago 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
249
    except asyncio.TimeoutError:
Open commit View diff
249 except asyncio.TimeoutError:
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
250
      pass
Open commit View diff
250 pass
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
251
Open commit View diff
251
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
252
if __name__ == '__main__':
Open commit View diff
252 if __name__ == '__main__':
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
253
  uvicorn.run(
Open commit View diff
253 uvicorn.run(
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
254
    app,
Open commit View diff
254 app,
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
255
    host="0.0.0.0",
Open commit View diff
255 host="0.0.0.0",
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
256
    port=443,
Open commit View diff
256 port=443,
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
257
    ssl_certfile="/app/dockerapi_cert.pem",
Open commit View diff
257 ssl_certfile="/app/dockerapi_cert.pem",
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
258
    ssl_keyfile="/app/dockerapi_key.pem",
Open commit View diff
258 ssl_keyfile="/app/dockerapi_key.pem",
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
259
    log_level="info",
Open commit View diff
259 log_level="info",
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
260
    loop="none"
Open commit View diff
260 loop="none"
same change 06cce79

[Dockerapi] add pubsub handler for broadcasting in ha setup

Full commit hash
06cce79806fccefa29f7145a7421ca8d122f6dbe
Author
FreddleSpl0it <[email protected]>
Date
about 3 years ago
Selected line
261
  )
Open commit View diff
261 )