merge with master

This commit is contained in:
Klemek
2022-03-07 13:28:29 +01:00
parent 51911604a9
commit 0ceffca196
4 changed files with 17 additions and 13 deletions
+4
View File
@@ -0,0 +1,4 @@
DISCORD_TOKEN=
PYTHONPATH=./src
CRYPT_KEY=
LOG_DIR=logs
+2 -2
View File
@@ -2,5 +2,5 @@ discord.py==1.7.0
python-dotenv==0.15.0 python-dotenv==0.15.0
python-dateutil==2.8.1 python-dateutil==2.8.1
git+git://github.com/Klemek/miniscord.git git+git://github.com/Klemek/miniscord.git
numpy matplotlib
matplotlib cryptography
-1
View File
@@ -2,7 +2,6 @@ from typing import List
from datetime import timedelta from datetime import timedelta
import calendar import calendar
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np
from io import BytesIO from io import BytesIO
import discord import discord
import time import time
+11 -10
View File
@@ -8,28 +8,29 @@ import time
import logging import logging
import asyncio import asyncio
import threading import threading
from dotenv import load_dotenv
from . import ChannelLogs from . import ChannelLogs
from utils import code_message, delta, deltas from utils import code_message, delta, deltas
LOG_DIR = "logs"
LOG_EXT = ".logz"
current_analysis = [] current_analysis = []
current_analysis_lock = threading.Lock() current_analysis_lock = threading.Lock()
ALREADY_RUNNING = -100 ALREADY_RUNNING = -100
CANCELLED = -200 CANCELLED = -200
NO_FILE = -300 NO_FILE = -300
# 5 minutes, assume 'fast' arg load_dotenv()
MIN_MODIFICATION_TIME = 5 * 60
# 30 days, remove log file
MAX_MODIFICATION_TIME = 30 * 24 * 60 * 60
LOG_DIR = os.getenv("LOG_DIR", "logs")
LOG_EXT = os.getenv("LOG_DIR", ".logz")
CRYPT_KEY = os.getenv("CRYPT_KEY", "")
# 5 minutes, assume 'fast' arg
MIN_MODIFICATION_TIME = int(os.getenv("MAX_MODIFICATION_TIME", 5 * 60))
# 30 days, remove log file
MAX_MODIFICATION_TIME = int(os.getenv("MAX_MODIFICATION_TIME", 30 * 24 * 60 * 60))
class Worker: class Worker:
def __init__( def __init__(