Execute all workflows
357392
def execute_all(self):
        
        for workflow_id in self.workflows:
            if self.workflows[workflow_id].online:
                for interval in self.workflows[workflow_id].requested_intervals:
                    logging.info("Executing workflow {} over interval {}".format(workflow_id, interval))
                    self.workflows[workflow_id].execute(interval)
848320
def execute(self):
        """"""
        if self._cli_arguments['cfn']:
            generate_sample_cfn_module(self.env_root)
        elif self._cli_arguments['sls']:
            generate_sample_sls_module(self.env_root)
        elif self._cli_arguments['sls-tsc']:
            generate_sample_sls_tsc_module(self.env_root)
        elif self._cli_arguments['stacker']:
            generate_sample_stacker_module(self.env_root)
        elif self._cli_arguments['tf']:
            generate_sample_tf_module(self.env_root)
        elif self._cli_arguments['cdk-tsc']:
            generate_sample_cdk_tsc_module(self.env_root)
        elif self._cli_arguments['cdk-py']:
            generate_sample_cdk_py_module(self.env_root)
        elif self._cli_arguments['cdk-csharp']:
            generate_sample_cdk_cs_module(self.env_root)
1006778
def execute(self, *args, **kwargs):
        
        args = self.parser.parse_args(*args, **kwargs)
        self.process(args)
294496
function execute(req, res) {
  var scanner = new Scanner(
    req.db.getKeys(), req.info.cursor, req.info.pattern, req.info.count);
  scanner.scan(req, res);
}
75234
def execute(self, args):
        """"""
        hook_name = os.path.basename(args[0])
        extra_vars = None
        if hook_name in self._actions:
            extra_vars = self._actions[hook_name](args[1:])
        else:
            super(AnsibleHooks, self).execute(args)

        charmhelpers.contrib.ansible.apply_playbook(
            self.playbook_path, tags=[hook_name], extra_vars=extra_vars)
911075
public function execute()
    {
        $model = new \Gems_Model_TemplateModel('templates', $this->project);
        $templates = $model->load();
        foreach ($templates as $name => $data) {
            // Now load individual template
            $data = $model->load(array('name'=> $name));
            // And save
            $model->save(reset($data));
        }
    }
997627
def workflow(ctx, client):
    """"""
    if ctx.invoked_subcommand is None:
        from renku.models.refs import LinkReference

        names = defaultdict(list)
        for ref in LinkReference.iter_items(client, common_path='workflows'):
            names[ref.reference.name].append(ref.name)

        for path in client.workflow_path.glob('*.cwl'):
            click.echo(
                '{path}: {names}'.format(
                    path=path.name,
                    names=', '.join(
                        click.style(_deref(name), fg='green')
                        for name in names[path.name]
                    ),
                )
            )
1171405
def execute_action_list(obj, target, kw):
    """"""
    env = obj.get_build_env()
    kw = obj.get_kw(kw)
    status = 0
    for act in obj.get_action_list():
        args = ([], [], env)
        status = act(*args, **kw)
        if isinstance(status, SCons.Errors.BuildError):
            status.executor = obj
            raise status
        elif status:
            msg = "Error %s" % status
            raise SCons.Errors.BuildError(
                errstr=msg, 
                node=obj.batches[0].targets,
                executor=obj, 
                action=act)
    return status
1330379
def execute(self, data):
        """"""
        if Crawl.is_aborted(self.crawler, self.run_id):
            return

        try:
            Crawl.operation_start(self.crawler, self.stage, self.run_id)
            self.log.info('[%s->%s(%s)]: %s',
                          self.crawler.name,
                          self.stage.name,
                          self.stage.method_name,
                          self.run_id)
            return self.stage.method(self, data)
        except Exception as exc:
            self.emit_exception(exc)
        finally:
            Crawl.operation_end(self.crawler, self.run_id)
            shutil.rmtree(self.work_path)
434383
def run(self):
        

        for extension in self.extensions:

            if extension.name == "bpy":

                self.build_cmake(extension)

        super().run()
725207
def run_all(self):
        # type: () -> None
        
        logger.debug("Creating batch session")
        session = Session()

        for section_id in self.parser.sections():
            self.run_job(section_id, session=session)
460746
function execute(req, res) {
  // TODO: ensure a conflict is triggered on all watched keys
  this.store.flushall();
  res.send(null, Constants.OK);
}
624926
def run_all_clicked(self):
        """"""
        self.reset_status()

        self.enable_busy_cursor()
        report = []
        fail_count = 0
        pass_count = 0

        index = 0
        for row in range(self.table.rowCount()):
            item = self.table.item(row, 0)
            status_item = self.table.item(row, 1)
            name_item = item.text()

            try:
                index += 1
                result = self.run_task(item, status_item, index=index)
                if result:
                    # P for passed
                    report.append('P: %s\n' % name_item)
                    pass_count += 1
                else:
                    report.append('F: %s\n' % name_item)
                    fail_count += 1
            except Exception as e:  # pylint: disable=W0703
                LOGGER.exception(
                    'Batch execution failed. The exception: ' + str(e))
                report.append('F: %s\n' % name_item)
                fail_count += 1
                self.disable_busy_cursor()

        try:
            report_path = self.write_report(
                report, pass_count, fail_count)
            self.show_report(report_path)
        except IOError:
            # noinspection PyArgumentList,PyCallByClass,PyTypeChecker
            QMessageBox.question(self, 'Error',
                                       'Failed to write report file.')
            self.disable_busy_cursor()
        self.disable_busy_cursor()
655293
function executeHooks(data, allHooks, checkHooks, creationMode) {
    var hooksToCall = creationMode ? allHooks : checkHooks;
    if (hooksToCall) {
        callHooks(data, hooksToCall);
    }
}
1106963
static function runWorkflow( $workflowProcess )
    {
        $workflow = eZWorkflow::fetch( $workflowProcess->attribute( "workflow_id" ) );
        $workflowEvent = null;

        $workflowStatus = $workflowProcess->run( $workflow, $workflowEvent, $eventLog );

        $db = eZDB::instance();
        $db->begin();
        $workflowProcess->store();

        switch ( $workflowStatus )
        {
            case eZWorkflow::STATUS_FAILED:
            case eZWorkflow::STATUS_CANCELLED:
            case eZWorkflow::STATUS_NONE:
            case eZWorkflow::STATUS_BUSY:
            {
                $workflowProcess->removeThis();
                $db->commit();
                return array( 'Status' => eZTrigger::WORKFLOW_CANCELLED,
                              'Result' => null );
            } break;
            case eZWorkflow::STATUS_FETCH_TEMPLATE:
            case eZWorkflow::STATUS_FETCH_TEMPLATE_REPEAT:
            {
                $tpl = eZTemplate::factory();
                $result = array();
                foreach ( array_keys( $workflowProcess->Template['templateVars'] ) as $key )
                {
                    $value = $workflowProcess->Template['templateVars'][$key];
                    $tpl->setVariable( $key, $value );
                }
                $result['content'] = $tpl->fetch( $workflowProcess->Template['templateName'] );
                if ( isset( $workflowProcess->Template['path'] ) )
                    $result['path'] = $workflowProcess->Template['path'];

                    $db->commit();
                if ( $workflowStatus == eZWorkflow::STATUS_FETCH_TEMPLATE )
                {
                    $triggerStatus = eZTrigger::FETCH_TEMPLATE;
                }
                elseif ( $workflowStatus == eZWorkflow::STATUS_FETCH_TEMPLATE_REPEAT )
                {
                    $triggerStatus = eZTrigger::FETCH_TEMPLATE_REPEAT;
                }
                return array( 'Status' => $triggerStatus,
                              'WorkflowProcess' => $workflowProcess,
                              'Result' => $result );
            } break;
            case eZWorkflow::STATUS_REDIRECT:
            {
//                var_dump( $workflowProcess->RedirectUrl  );
                $db->commit();
                return array( 'Status' => eZTrigger::REDIRECT,
                              'WorkflowProcess' => $workflowProcess,
                              'Result' => $workflowProcess->RedirectUrl );

            } break;
            case eZWorkflow::STATUS_DEFERRED_TO_CRON:
            {

                $db->commit();
                return array( 'Status' => eZTrigger::STATUS_CRON_JOB,
                              'WorkflowProcess' => $workflowProcess,
                              'Result' => array( 'content' => 'Deffered to cron. Operation halted during execution. <br/>Refresh page to continue<br/><br/><b>Note: The halt is just a temporary test</b><br/>',
                                                 'path' => array( array( 'text' => 'Operation halt',
                                                                         'url' => false ) ) ) );
/*
                return array( 'Status' => eZTrigger::STATUS_CRON_JOB,
                              'Result' => $workflowProcess->attribute( 'id') );
*/
            } break;
            case eZWorkflow::STATUS_RESET:
            {
                $db->commit();
                return array( 'Status' => eZTrigger::WORKFLOW_RESET,
                              'WorkflowProcess' => $workflowProcess,
                              'Result' => array( 'content' => 'Workflow was reset',
                                                 'path' => array( array( 'text' => 'Operation halt',
                                                                         'url' => false ) ) ) );
            } break;
            case eZWorkflow::STATUS_DONE:
            {
                $workflowProcess->removeThis();
                $db->commit();
                return array( 'Status' => eZTrigger::WORKFLOW_DONE,
                              'Result' => null );
            }
        }

        $db->commit();
        return array( 'Status' => eZTrigger::WORKFLOW_CANCELLED,
                      'Result' => null );



    }
890586
def execute(global_options,options,arguments) 
      get_action(arguments).call(global_options,options,arguments)
    end
68334
def execute_work_items(work_items, config):
    
    return celery.group(
        worker_task.s(work_item, config)
        for work_item in work_items
    )