Executes method immediately.

@param {String} methodName Method name.
@param {Object} params Data should be sent to the method.
@param {Object} execOptions Exec-specific options.
@returns {vow.Promise}
431215
function (methodName, params, execOptions) {
                var defer = vow.defer();
                var url = this._basePath + methodName;
                var data = JSON.stringify(params);

                sendAjaxRequest(url, data, execOptions).then(
                    this._resolvePromise.bind(this, defer),
                    this._rejectPromise.bind(this, defer)
                );

                return defer.promise();
            }
10168
function exec(scope, req, res) {
  var replies = [], item;

  // NOTE: incrby invalid amount will trigger EXECABORT
  // NOTE: wrong number of args are returned to the client
  // NOTE: but other types of validation errors (argument type coercion)
  // NOTE: trigger EXECABORT

  if(this.error) return this.destroy(req, res, ExecAbort);
  if(this.conflict) return this.destroy(req, res, null, null);

  function onReply(err, reply) {
    replies.push(err || reply);
  }

  onReply = onReply.bind(this);

  // fifo queue, maintain order
  while((item = this.queue.shift()) !== undefined) {
    if(item.err) {
      replies.push(item.err);
    }else{
      item.res.cb = onReply;

      // execute via the server so that these command
      // executions are included in slowlog/monitor
      scope.execute(item.req.exec, item.req, item.res);
    }
  }

  // reply and destroy this transaction
  this.destroy(req, res, null, replies);
}
967384
def execute(method, *args)
      new_args = args

      @pre_request.each do |middleware|
        new_args = middleware.call(*new_args)
      end

      path = new_args.empty? ? '' : new_args.shift

      req = proc do ||
        @resource[path].send(method, *new_args)
      end

      post = proc do |result|
        @post_request.each do |middleware|
          result = middleware.call(result)
        end

        result
      end

      Concurrent::Promise.new(&req).on_success(&post)
    end
361468
@Override
    public QueryResult<P> execute(StatementOptions options, Object... params) {
        return multi(options).add(params).execute();
    }
523153
private function execCommand($operation, array $params)
    {
        // Create the command.
        $command = $this->client->getCommand(
            $this->info['command'][$operation],
            $params + $this->state->getId()
        );

        // Execute the before callback.
        if (is_callable($this->config["before_{$operation}"])) {
            $this->config["before_{$operation}"]($command);
        }

        // Execute the command asynchronously and return the promise.
        return $this->client->executeAsync($command);
    }
814585
public function statementExecute(string $name, array $params): Promise
    {
        return call(function () use ($name, $params) {
            return $this->createResult(yield from $this->send("pg_send_execute", $name, $params));
        });
    }
1040747
function executeCommand(parameters) {
    if (parameters.environment === undefined) { parameters.environment = plugin.myrmex.getConfig('environment'); }
    if (parameters.stage === undefined) { parameters.stage = plugin.myrmex.getConfig('stage'); }
    const context = {
      environment: parameters.environment,
      stage: parameters.stage
    };

    return plugin.loadApis()
    .then(apis => {
      // Give an overview of what will be deployed
      apis = _.filter(apis, api => { return parameters.apiIdentifiers.indexOf(api.getIdentifier()) !== -1; });
      const endpoints = _.concat.apply(null, _.map(apis, api => { return api.getEndpoints(); }));
      const filteredEndpoints = _.reduce(endpoints, (result, endpoint) => {
        let r = _.find(result, (o) => { return o.path === endpoint.getResourcePath() && o.method === endpoint.getMethod() });
        if (!r) {
          r = {
            path: endpoint.getResourcePath(),
            method: endpoint.getMethod(),
            apis: []
          }
          result.push(r);
        }
        r.apis = _.union(r.apis, endpoint.getSpec()['x-myrmex'].apis);
        return result;
      }, []);
      const sortedEndpoints = _.sortBy(filteredEndpoints, ['path', 'method']);
      const t = new Table();
      _.forEach(sortedEndpoints, endpoint => {
        t.cell('Path', endpoint.path);
        t.cell('Method', endpoint.method);
        _.forEach(endpoint.apis, apiIdentifier => {
          if (parameters.apiIdentifiers.indexOf(apiIdentifier) > -1) {
            t.cell(apiIdentifier, 'X');
          }
        });
        t.newRow();
      });
      icli.print();
      icli.print('Endpoints to deploy');
      icli.print();
      icli.print(t.toString());

      // Load endpoints integrations
      return Promise.all([
        apis,
        plugin.loadIntegrations(parameters.region, context, endpoints)
      ]);
    })
    .spread((apis, integrations) => {
      // Deploy in API Gateway
      // To avoid TooManyRequestsException, we delay the deployment of each API
      const promises = [];
      let delay = 0;
      _.forEach(apis, api => {
        promises.push(new Promise((resolve, reject) => {
          // 35 seconds delay
          setTimeout(() => {
            icli.print('Deploying ' + icli.format.info(api.getIdentifier()) + ' ...');
            resolve(api.deploy(parameters.region, context));
          }, delay * 35000);
        }));
        delay++;
      });
      return Promise.all([
        apis,
        Promise.all(promises)
      ]);
    })
    .spread((apis, results) => {
      // Display deployment result
      let success = true;
      const t = new Table();
      _.forEach(results, result => {
        t.cell('Identifier', result.api.getIdentifier());
        t.cell('Name', result.report.name);
        t.cell('Operation', result.report.operation);
        t.cell('Stage', result.report.stage);
        t.cell('AWS identifier', result.report.awsId);
        if (result.report.failed) {
          t.cell('Url', icli.format.error(result.report.failed));
          success = false;
        } else {
          t.cell(
            'Url',
            icli.format.info('https://' + result.report.awsId + '.execute-api.' + result.report.region + '.amazonaws.com/' + result.report.stage)
          );
        }
        t.newRow();
      });
      icli.print();
      icli.print(icli.format.success('Deployment done'));
      icli.print();
      icli.print(t.toString());

      // Publish the APIs
      if (success) {
        return Promise.map(apis, api => { return api.publish(parameters.region, context); })
        .then(() => {
          icli.print(icli.format.success('APIs have been published'));
          icli.print();
        })
        .catch(e => {
          icli.print(icli.format.error('The deployment of APIs succeed but the publication step failed.'));
          icli.print(e);
          process.exit(1);
        });
      } else {
        icli.print(icli.format.error('The deployment of one or more APIs failed. The publication step will not be performed.'));
        icli.print();
        process.exit(1);
      }
    });
  }
999452
function eval$exec(params) {
  var $exec = params.$exec;
  var $method = params.$method;
  var executor = this.js._executors[$exec];
  if (!executor) throw new Error('unknown executor ' + $exec);
  if ($method) {
    if (typeof executor[$method] != 'function')
      throw new Error('unknown method ' + $method + ' of executor ' + $exec);
    return util.toPromise(executor[$method](params.$args));
  }
  if (typeof executor != 'function')
    throw new Error('executor ' + $exec + ' is not a function');
  return util.toPromise(executor(params.$args));
}
757268
function executeCommand(parameters) {
    icli.print();
    icli.print('Installing ' + icli.format.info(parameters.lambdaIdentifiers.length) + ' Lambdas:');
    icli.print();
    icli.print('This operation may last a little');

    return plugin.loadLambdas()
    .then(lambdas => {
      // If lambdaIdentifier is empty, we install all lambdas
      if (parameters.lambdaIdentifiers) {
        lambdas = _.filter(lambdas, lambda => { return parameters.lambdaIdentifiers.indexOf(lambda.getIdentifier()) !== -1; });
      }
      return Promise.map(lambdas, (lambda) => {
        return lambda.installLocally();
      });
    })
    .then(() => {
      const lambdaList = parameters.lambdaIdentifiers.map(icli.format.info).join(', ');
      icli.print();
      icli.print('The following Lambdas have been installed: ' + lambdaList);
      icli.print();
    });
  }
511567
public String exec(String apiPath, String method, String query, Object payload, boolean needAuth)
			throws IOException {
		if (payload == null)
			payload = "";

		String responseText = null;

		boolean cached = false;
		if (cacheManager != null) {
			responseText = cacheManager.getCache(apiPath, method, query, payload);
			if (responseText != null)
				cached = true;
		}

		if (responseText == null)
			try {
				responseText = execInternal(method, query, payload, needAuth);
			} catch (OvhException e0) {
				throw e0;
			} catch (OvhServiceException e0) {
				throw e0;
			} catch (SocketTimeoutException e1) {
				log.error("calling {} {} Failed by timeout. (ConnectTimeout:{} ReadTimeout:{})", method, query,
						config.getConnectTimeout(), config.getReadTimeout());
				responseText = execInternal(method, query, payload, needAuth);
			} catch (IOException e2) {
				log.error("API OVH IOException", e2);
				throw e2;
			}
		if (cacheManager != null && !cached)
			cacheManager.setCache(apiPath, method, query, payload, responseText);

		if (mtdHandler != null) {
			for (String mtd : new String[] { method, "ALL" }) {
				TreeMap<String, OphApiHandler> handlers = null;
				OphApiHandler handler = null;
				handlers = mtdHandler.get(mtd);
				if (handlers == null)
					continue;
				handler = handlers.get(apiPath);
				if (handler == null)
					continue;
				try {
					handler.accept(method, method, payload, responseText);
				} catch (Exception e) {
					log.warn("Handler throw exeption on {} {} : {}", method, method, e);
				}
			}
		}
		return responseText;
	}
435776
function _execute(httpMethod, urlSuffix, options, errorMessage) {
        const opts = {
            headers: {
                'Content-Type': 'application/json',
                'ngapimockid': ngapimockid
            }
        };

        if (options !== undefined) {
            opts.json = options;
        }

        return _handleRequest(httpMethod, urlSuffix, opts, errorMessage);
    }
215219
function(params) {
    var success = function(result) {
      if (!EventHandlers.hasOwnProperty(result.eventName)) {
        return;
      }

      for (var index in EventHandlers[result.eventName]) {
        EventHandlers[result.eventName][index].apply(undefined, [result.value]);
      }
    };

    exec(success, null, PLUGIN_NAME, "init", [params]);
  }
260402
function executeCommand(parameters) {
    if (parameters.colors === undefined) { parameters.colors = plugin.myrmex.getConfig('colors'); }

    return plugin.findEndpoint(parameters.resourcePath, parameters.httpMethod)
    .then(endpoint => {
      const jsonSpec = endpoint.generateSpec(parameters.specVersion);
      let spec = JSON.stringify(jsonSpec, null, 2);
      if (parameters.colors) {
        spec = icli.highlight(spec, { json: true });
      }
      icli.print(spec);
      return Promise.resolve(jsonSpec);
    });
  }
53003
function call(method, key) {
    if (!exports.results.has(method))
        create(method); // create as needed
    const methodCache = exports.results.get(method);
    let callResults;
    if (methodCache.has(key)) {
        log_1.logger.debug(`[${method}] Calling (cached): ${key}`);
        // return from cache if key has been used on method before
        callResults = methodCache.get(key);
    }
    else {
        // call and cache for next time, returning results
        log_1.logger.debug(`[${method}] Calling (caching): ${key}`);
        callResults = exports.instance.call(method, key).result;
        methodCache.set(key, callResults);
    }
    return Promise.resolve(callResults);
}
1359375
function exec(cmd, args, opts) {
  console.log(`Running command: ${cmd} ${args.join(' ')}`);
  const cp = childProcessSpawn(cmd, args, opts);

  cp.stdout.on('data', data => log(data));
  cp.stderr.on('data', data => log(data));

  return new Promise((resolve, reject) => {
    cp.on('error', err => reject(log(err)));
    cp.on('exit', code => resolve(code));
  });
}
397089
function exec() {
    var defer = q.defer();
    cp.exec(this, function(err, stdout, stderr) {
        if (err) console.log('exec err: '+ err);
        console.log(stdout);
        defer.resolve(err)
    })
    return defer.promise;
}
564635
function(packageName, componentName) {
        return new Promise(function(resolve, reject) {
            exec(resolve, reject, APP_PLUGIN_NAME, "startApp", [packageName, componentName]);
        });
    }