コード例 #1
0
    def add_db_insert(self, mongo_database, insertion_data=None,
                      criteria=None):
        if insertion_data is None:
            insertion_data = {'structure': 'get_final_structure'}
        spec = self.set_short_single_core_to_spec()
        spec['mongo_database'] = mongo_database.as_dict()
        spec['_add_launchpad_and_fw_id'] = True
        insert_fw = Firework([DatabaseInsertTask(insertion_data=insertion_data, criteria=criteria)],
                             spec=spec,
                             name=(self.wf.name + "_insert"))

        append_fw_to_wf(insert_fw, self.wf)
コード例 #2
0
 def append_fw(self, fw, short_single_spec=False):
     if short_single_spec:
         fw.spec.update(self.set_short_single_core_to_spec())
     append_fw_to_wf(fw, self.wf)
コード例 #3
0
 def append_fw(self, fw, short_single_spec=False):
     if short_single_spec:
         fw.spec.update(self.set_short_single_core_to_spec())
     append_fw_to_wf(fw, self.wf)