mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-12 14:00:17 +02:00
Teamspeak group syncing now occurs once per database update rather than once per user per db update.
Reduces calls to teamspeak as per #134
This commit is contained in:
parent
e1a461a0cc
commit
cddedde26e
@ -212,10 +212,10 @@ def remove_from_databases(user, groups, syncgroups):
|
|||||||
@periodic_task(run_every=crontab(minute="*/1"))
|
@periodic_task(run_every=crontab(minute="*/1"))
|
||||||
def run_databaseUpdate():
|
def run_databaseUpdate():
|
||||||
users = User.objects.all()
|
users = User.objects.all()
|
||||||
|
Teamspeak3Manager._sync_ts_group_db()
|
||||||
for user in users:
|
for user in users:
|
||||||
groups = user.groups.all()
|
groups = user.groups.all()
|
||||||
syncgroups = SyncGroupCache.objects.filter(user=user)
|
syncgroups = SyncGroupCache.objects.filter(user=user)
|
||||||
Teamspeak3Manager._sync_ts_group_db()
|
|
||||||
add_to_databases(user, groups, syncgroups)
|
add_to_databases(user, groups, syncgroups)
|
||||||
remove_from_databases(user, groups, syncgroups)
|
remove_from_databases(user, groups, syncgroups)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user