Skip to content
This repository was archived by the owner on Nov 23, 2022. It is now read-only.

Commit 2d45cd9

Browse files
committed
added support for partial syncing
1 parent 2f06662 commit 2d45cd9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

readbox/management/commands/sync.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,18 @@ class Command(base_command.CustomBaseCommand):
2323
default=10),
2424
)
2525

26-
def handle(self, threads=1, no_cache=False, *args, **kwargs):
26+
def handle(self, *args, **kwargs):
2727
base_command.CustomBaseCommand.handle(self, *args, **kwargs)
28+
threads = kwargs['threads']
29+
no_cache = kwargs['no_cache']
30+
31+
if args:
32+
path, = args
33+
else:
34+
path = None
2835

2936
dropbox.Syncer(
3037
force=no_cache,
3138
threads=threads,
32-
).start()
39+
).start(path=path)
3340

0 commit comments

Comments
 (0)