Example #1
0
         }
     } else {
         logger("\tUpload FAILED: unable to connect to file storage\n");
         logger("\t" . var_dump($APP['fs']) . "\n");
     }
     // end else ( not able to connect to file storage )
     $OUTPUT_LOCATION = $APP['fs']->key_url($bucket_name, $keyname);
     // send value OUTPUT_LOCATION to JOBS db table
     if (strlen($OUTPUT_LOCATION) > 0 || isset($the_post['servercxo']) || isset($the_post['servercco'])) {
         $NEW_STRING = new strings();
         $sha1_string = sha1(microtime() . $OUTPUT_LOCATION);
         $props = array();
         $props['id'] = $sha1_string;
         $props['val'] = $OUTPUT_LOCATION;
         $NEW_STRING->create($props);
         $JOB->update_raw(array("str_output" => $NEW_STRING->id));
     }
     // END OF OUTPUT INSERTION INTO DB
     // IS CXO OR CCO TURNED ON? CREATE CACHE ENTRY, AND UPDATE HF_ID_USER TABLE
     if (isset($the_post['servercxo']) || isset($the_post['servercco'])) {
         echo "\tCXO/CCO PROCESSING\n";
         $db_field = "str_cache_out_xml";
         if (isset($the_post['servercco'])) {
             $db_field = "str_cache_out_cxml";
         }
         $JOB->obj_hf->update_raw(array($db_field => $NEW_STRING->id));
     }
 }
 // end if (create output & upload)
 $run_output_expression_if_exists = false;
 $output_expression_jid = $JID;