コード例 #1
0
def _upload(args, request, ingestion_function):
    if 0 <= args.wait < 10:
        raise ee.EEException('Wait time should be at least 10 seconds.')
    task_id = ee.data.newTaskId()[0]
    ingestion_function(task_id, request)
    print('Started upload task with ID: %s' % task_id)
    if args.wait >= 0:
        print('Waiting for the upload task to complete...')
        utils.wait_for_task(task_id, args.wait)
コード例 #2
0
ファイル: commands.py プロジェクト: tylere/earthengine-api
def _upload(args, request, ingestion_function):
  if 0 <= args.wait < 10:
    raise ee.EEException('Wait time should be at least 10 seconds.')
  task_id = ee.data.newTaskId()[0]
  ingestion_function(task_id, request, args.force)
  print('Started upload task with ID: %s' % task_id)
  if args.wait >= 0:
    print('Waiting for the upload task to complete...')
    utils.wait_for_task(task_id, args.wait)
コード例 #3
0
def _upload(args, config, request):
  config.ee_init()
  if 0 <= args.wait < 10:
    raise ee.EEException('Wait time should be at least 10 seconds.')
  task_id = ee.data.newTaskId()[0]
  ee.data.startIngestion(task_id, request)
  print('Started upload task with ID: %s' % task_id)
  if args.wait >= 0:
    print('Waiting for the upload task to complete...')
    utils.wait_for_task(task_id, args.wait)