Skip to content

Commit

Permalink
client: add --async option to scan-repository, recommend usage in git…
Browse files Browse the repository at this point in the history
… post-receive
sbourdeauducq committed Apr 4, 2016
1 parent f9db7e4 commit eba90c8
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion artiq/frontend/artiq_client.py
Original file line number Diff line number Diff line change
@@ -96,6 +96,8 @@ def get_argparser():

parser_scan_repos = subparsers.add_parser(
"scan-repository", help="trigger a repository (re)scan")
parser_scan_repos.add_argument("--async", action="store_true",
help="trigger scan and return immediately")
parser_scan_repos.add_argument("revision", default=None, nargs="?",
help="use a specific repository revision "
"(defaults to head)")
@@ -159,7 +161,10 @@ def _action_scan_devices(remote, args):


def _action_scan_repository(remote, args):
remote.scan_repository(args.revision)
if args.async:
remote.scan_repository_async(args.revision)
else:
remote.scan_repository(args.revision)


def _action_ls(remote, args):
2 changes: 1 addition & 1 deletion doc/manual/getting_started_mgmt.rst
Original file line number Diff line number Diff line change
@@ -93,7 +93,7 @@ There should be no errors displayed, and if you start the GUI again you should n
First, another small configuration step is needed. We must tell Git to make the master rescan the repository when new data is added to it. Create a file ``~/artiq-master/repository/hooks/post-receive`` with the following contents: ::

#!/bin/sh
artiq_client scan-repository
artiq_client scan-repository --async

Then set the execution permission on it: ::

0 comments on commit eba90c8

Please sign in to comment.