コード例 #1
0
    exit(-1)

# Create the second production step and add it to the Production
inputquery = {"application": "mandelbrot", "image_format": "ascii", "image_width": 7680, "image_height": 200}
outputquery = {"application": "mandelbrot", "image_format": "ascii", "image_width": 7680, "image_height": 1400}
prodStep2 = createProductionStep("MergeImage", "DataProcessing", inputQuery=inputquery, outputQuery=outputquery)

body = createWorkflowBodyStep2()
prodStep2.Body = body
prodStep2.ParentStep = prodStep1
res = prodClient.addProductionStep(prodStep2)
if not res["OK"]:
    gLogger.error("Failed to add production step", res["Message"])
    exit(-1)

# Get the production description
prodDesc = prodClient.prodDescription

# Create the production
prodName = "SeqProd"
res = prodClient.addProduction(prodName, json.dumps(prodDesc))
if not res["OK"]:
    gLogger.error("Failed to add production", res["Message"])
    exit(-1)

# Start the production, i.e. instantiate the transformation steps
res = prodClient.startProduction(prodName)
if not res["OK"]:
    gLogger.error("Failed to start production", res["Message"])
    exit(-1)
コード例 #2
0
    ##################################
    # Define EventDisplay analysis steps and add them to the production
    # dark nsb = 1
    prod_step_2 = build_evndisp_step(DL0_data_set, nsb=1)
    prod_step_2.ParentStep = prod_step_1
    prod_sys_client.addProductionStep(prod_step_2)
    # moon nsb = 5
    prod_step_3 = build_evndisp_step(DL0_data_set, nsb=5)
    prod_step_3.ParentStep = prod_step_1
    prod_sys_client.addProductionStep(prod_step_3)

    ##################################
    # Get the production description
    prod_description = prod_sys_client.prodDescription

    # Create the production
    res = prod_sys_client.addProduction(prod_name, json.dumps(prod_description))
    if not res['OK']:
        DIRAC.gLogger.error(res['Message'])
        DIRAC.exit(-1)

    # Start the production, i.e. instantiate the transformation steps
    res = prod_sys_client.startProduction(prod_name)

    if not res['OK']:
        DIRAC.gLogger.error(res['Message'])
        DIRAC.exit(-1)

    DIRAC.gLogger.notice('Production %s successfully created' % prod_name)