equal
deleted
inserted
replaced
21 parser.add_option('-R', "--read-only", dest='read_only', action="store_true", default=False, |
21 parser.add_option('-R', "--read-only", dest='read_only', action="store_true", default=False, |
22 help="Do not attempt to modify the gallery") |
22 help="Do not attempt to modify the gallery") |
23 |
23 |
24 parser.add_option('-F', "--force-update", dest='force_update', action="store_true", default=False, |
24 parser.add_option('-F', "--force-update", dest='force_update', action="store_true", default=False, |
25 help="Force updates, even for fresh items") |
25 help="Force updates, even for fresh items") |
|
26 |
|
27 parser.add_option('-j', "--jobs", metavar='COUNT', type="int", dest='task_threads', default=None, |
|
28 help="Set threaded concurrency level for tasks") |
26 |
29 |
27 return parser |
30 return parser |
28 |
31 |
29 def build_config (options) : |
32 def build_config (options) : |
30 """ |
33 """ |
41 if options.read_only : |
44 if options.read_only : |
42 config.read_only = True |
45 config.read_only = True |
43 |
46 |
44 if options.force_update : |
47 if options.force_update : |
45 config.force_update = True |
48 config.force_update = True |
|
49 |
|
50 if options.task_threads : |
|
51 config.task_threads = options.task_threads |
46 |
52 |
47 # XXX: load config file(s) |
53 # XXX: load config file(s) |
48 |
54 |
49 return config |
55 return config |
50 |
56 |