diff --git a/tabcmd/commands/extracts/refresh_extracts_command.py b/tabcmd/commands/extracts/refresh_extracts_command.py index b88f220b..0e4392bb 100644 --- a/tabcmd/commands/extracts/refresh_extracts_command.py +++ b/tabcmd/commands/extracts/refresh_extracts_command.py @@ -22,6 +22,7 @@ def define_args(refresh_extract_parser): set_calculations_options(group) set_project_arg(group) set_parent_project_arg(group) + set_sync_wait_options(group) @staticmethod def run_command(args): @@ -31,14 +32,11 @@ def run_command(args): server = session.create_session(args, logger) if args.addcalculations or args.removecalculations: - logger.warning("Add/Remove Calculations tasks are not yet implemented.") + logger.warning("Add/Remove Calculations tasks are not supported.") - # are these two mandatory? mutually exclusive? # docs: the REST method always runs a full refresh even if the refresh type is set to incremental. if args.incremental: # docs: run the incremental refresh logger.warn("Incremental refresh is not yet available through the new tabcmd") - # if args.synchronous: # docs: run a full refresh and poll until it completes - # else: run a full refresh but don't poll for completion try: item = Extracts.get_wb_or_ds_for_extracts(args, logger, server) @@ -54,7 +52,6 @@ def run_command(args): logger.info(_("common.output.job_queued_success")) logger.debug("Extract refresh queued with JobID: {}".format(job.id)) - if args.synchronous: # maintains a live connection to the server while the refresh operation is underway, polling every second # until the background job is done. diff --git a/tabcmd/execution/global_options.py b/tabcmd/execution/global_options.py index 6c972616..849316ef 100644 --- a/tabcmd/execution/global_options.py +++ b/tabcmd/execution/global_options.py @@ -346,7 +346,7 @@ def set_append_replace_option(parser): ) # what's the difference between this and 'overwrite'? - # This is meant for when a) the local file is an extract b) the server item is an existing data source + # This one replaces the data but not the metadata append_group.add_argument( "--replace", action="store_true", @@ -355,7 +355,7 @@ def set_append_replace_option(parser): ) -# this is meant to be like replacing like +# this is meant to be publish the whole thing on top of what's there def set_overwrite_option(parser): parser.add_argument( "-o", @@ -368,13 +368,16 @@ def set_overwrite_option(parser): # refresh-extracts def set_incremental_options(parser): - sync_group = parser.add_mutually_exclusive_group() - sync_group.add_argument("--incremental", action="store_true", help="Runs the incremental refresh operation.") - sync_group.add_argument( + parser.add_argument("--incremental", action="store_true", help="Runs the incremental refresh operation.") + return parser + + +def set_sync_wait_options(parser): + parser.add_argument( "--synchronous", action="store_true", help="Adds the full refresh operation to the queue used by the Backgrounder process, to be run as soon as a \ - Backgrounder process is available.", + Backgrounder process is available. The program will wait until the job has finished or the timeout has been reached.", ) return parser