Enhanced the repository sync
This commit is contained in:
parent
8fb0c1393a
commit
0117713934
4 changed files with 55 additions and 157 deletions
|
|
@ -1,17 +1,9 @@
|
|||
from django.core.management.base import BaseCommand, CommandError
|
||||
from ...models import BorgRepository
|
||||
from ...deployments import sync_users
|
||||
from django.core.management.base import BaseCommand
|
||||
from ...deployments import sync_repos
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = "Synchronized users on the host with the database."
|
||||
|
||||
def handle(self, *args, **options):
|
||||
|
||||
repos = BorgRepository.objects.all()
|
||||
|
||||
for repo in repos:
|
||||
self.stdout.write(f"{repo}")
|
||||
self.stdout.write(self.style.SUCCESS("This is a test"))
|
||||
|
||||
sync_users(dry_run=False)
|
||||
sync_repos(dry_run=False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue