diff --git a/app/torrent/management/commands/torrent_event.py b/app/torrent/management/commands/torrent_event.py index 9e03ac5..4dfaa09 100644 --- a/app/torrent/management/commands/torrent_event.py +++ b/app/torrent/management/commands/torrent_event.py @@ -46,7 +46,7 @@ class Command(BaseCommand): for name, task in self.task_schedule.items(): if name not in self.histories or time.time() - self.histories[name] > task["schedule"]: self.call_func(name) - time.sleep(0.5) + time.sleep(1) def exit_gracefully(self, signum, frame): self.stdout.write(self.style.SUCCESS("exit")) diff --git a/app/user/admin.py b/app/user/admin.py index 3364f0c..ebaa3af 100644 --- a/app/user/admin.py +++ b/app/user/admin.py @@ -8,6 +8,7 @@ from .models import User, FriendRequest, Invitation @admin.register(User) class UserAdmin(BaseUserAdmin): + ordering = ["pk"] # add_form = UserCreationForm form = UserChangeForm fieldsets = BaseUserAdmin.fieldsets + (