Skip to content

Commit

Permalink
merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
Klemek committed Mar 7, 2022
1 parent 5191160 commit 0ceffca
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DISCORD_TOKEN=
PYTHONPATH=./src
CRYPT_KEY=
LOG_DIR=logs
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ discord.py==1.7.0
python-dotenv==0.15.0
python-dateutil==2.8.1
git+git://github.com/Klemek/miniscord.git
numpy
matplotlib
matplotlib
cryptography
1 change: 0 additions & 1 deletion src/data_types/frequency.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from datetime import timedelta
import calendar
import matplotlib.pyplot as plt
import numpy as np
from io import BytesIO
import discord
import time
Expand Down
19 changes: 10 additions & 9 deletions src/logs/guild_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,29 @@
import logging
import asyncio
import threading

from dotenv import load_dotenv

from . import ChannelLogs
from utils import code_message, delta, deltas


LOG_DIR = "logs"
LOG_EXT = ".logz"

current_analysis = []
current_analysis_lock = threading.Lock()


ALREADY_RUNNING = -100
CANCELLED = -200
NO_FILE = -300

load_dotenv()

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 = 5 * 60
# 30 days, remove log file
MAX_MODIFICATION_TIME = 30 * 24 * 60 * 60
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:
def __init__(
Expand Down

0 comments on commit 0ceffca

Please sign in to comment.