Project

General

Profile

0001-api-add-support-for-sync-parameter-on-__provision__-.patch

Benjamin Dauvergne, 24 Sep 2021 09:56 AM

Download (914 Bytes)

View differences:

Subject: [PATCH] api: add support for ?sync parameter on /__provision__ API
 (#56921)

 wcs/api.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
wcs/api.py
1337 1337
    if not is_url_signed():
1338 1338
        raise AccessForbiddenError()
1339 1339

  
1340
    job = ProvisionAfterJob(json_data=get_request().json)
1341
    job.run(spool=True)
1340
    sync = request.form.get('sync') == '1'
1341

  
1342
    if sync:
1343
        CmdHoboNotify().process_notification(get_request().json)
1344
    else:
1345
        job = ProvisionAfterJob(json_data=get_request().json)
1346
        job.run(spool=True)
1342 1347
    return JsonResponse({'err': 0})
1343
-