Skip to content

Commit

Permalink
feat: Add ehco_reload_interval field to ProxyNode model
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 committed Dec 10, 2023
1 parent 982828a commit b12dc4e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
17 changes: 17 additions & 0 deletions apps/proxy/migrations/0019_proxynode_ehco_reload_interval.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.6 on 2023-12-10 03:14

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("proxy", "0018_alter_relaynode_web_token"),
]

operations = [
migrations.AddField(
model_name="proxynode",
name="ehco_reload_interval",
field=models.IntegerField(default=0, max_length=64, verbose_name="配置重载间隔"),
),
]
2 changes: 2 additions & 0 deletions apps/proxy/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ class ProxyNode(BaseNodeModel, SequenceMixin):
ehco_log_level = models.CharField(
"隧道日志等级", max_length=64, default="info", choices=EHCO_LOG_LEVELS
)
ehco_reload_interval = models.IntegerField("配置重载间隔", max_length=64, default=0)

upload_bandwidth_bytes = models.BigIntegerField("上传带宽", default=0)
current_used_upload_bandwidth_bytes = models.BigIntegerField("当前使用的上传带宽", default=0)
Expand Down Expand Up @@ -360,6 +361,7 @@ def get_ehco_server_config(self):
"web_port": self.ehco_web_port,
"web_token": self.ehco_web_token,
"log_level": self.ehco_log_level,
"reload_interval": self.ehco_reload_interval,
"relay_configs": [
{
"listen": f"{self.ehco_listen_host}:{self.ehco_listen_port}",
Expand Down
1 change: 0 additions & 1 deletion apps/sspanel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from django.db import models, transaction
from django.utils import functional, timezone
from redis.exceptions import LockError
from slugify import slugify

from apps import constants as c
from apps.ext import cache, encoder, lock, pay
Expand Down

0 comments on commit b12dc4e

Please sign in to comment.