initial commit
This commit is contained in:
commit
164fa61ad2
40 changed files with 1263 additions and 0 deletions
12
community_backup/webui/tasks.py
Normal file
12
community_backup/webui/tasks.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
from django.tasks import task
|
||||
from .deployments import sync_repos, get_users
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
|
||||
@task
|
||||
def update_user(user_pk):
|
||||
user = User.objects.get(pk=user_pk)
|
||||
username = f"u-{user.pk}"
|
||||
system_user = get_users()[username]
|
||||
|
||||
sync_repos(username=username, user=user, system_user=system_user)
|
||||
Loading…
Add table
Add a link
Reference in a new issue