Skip to content

Commit a9cb55d

Browse files
committed
Remove version specification from docker-compose files and clean up params.py by removing unused imports and code
1 parent efb00c9 commit a9cb55d

3 files changed

Lines changed: 2 additions & 38 deletions

File tree

docker-compose-release.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: "3.1"
2-
31
services:
42
app:
53
image: ghcr.io/102ch/thuuwa-tuuchi-bot:latest

docker-compose.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: "3.1"
2-
31
services:
42
app:
53
build: .

params.py

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,3 @@
1-
import os
2-
from db_utils import (
3-
load_notitext,
4-
load_is_target_channels,
5-
load_channel_id,
6-
load_call_end_notification_enabled,
7-
)
8-
9-
INITIAL_CHANNEL = int(os.environ['DISCORD_CHANNEL_ID'])
10-
INITIAL_TEXT = "@everyone"
11-
INITIAL_FLAG = True
12-
1+
# 通話開始時刻を記録するための辞書(チャンネルID -> 開始時刻)
2+
# これはメモリ上でのみ管理(再起動時にリセットされる)
133
e_time = {}
14-
try:
15-
notitext = load_notitext() # データベースから読み込み
16-
print(f"[DB] notitext loaded: {notitext}")
17-
18-
is_target_channel = load_is_target_channels() # データベースから読み込み
19-
print(f"[DB] is_target_channel loaded: {len(is_target_channel)} channels")
20-
21-
# channel_idをデータベースから読み込み、なければ初期値を使用
22-
loaded_channel_id = load_channel_id()
23-
channel_id = loaded_channel_id if loaded_channel_id is not None else INITIAL_CHANNEL
24-
print(f"[DB] channel_id loaded: {channel_id} (from DB: {loaded_channel_id is not None})")
25-
26-
# is_call_end_notification_enabledをデータベースから読み込み、なければ初期値を使用
27-
loaded_end_notification = load_call_end_notification_enabled()
28-
is_call_end_notification_enabled = loaded_end_notification if loaded_end_notification is not None else INITIAL_FLAG
29-
print(f"[DB] is_call_end_notification_enabled loaded: {is_call_end_notification_enabled} (from DB: {loaded_end_notification is not None})")
30-
except Exception as e:
31-
print(f"[DB] ERROR: Failed to load from database: {e}")
32-
notitext = INITIAL_TEXT
33-
is_target_channel = {}
34-
channel_id = INITIAL_CHANNEL
35-
is_call_end_notification_enabled = INITIAL_FLAG

0 commit comments

Comments
 (0)