Task entrypoint : stage the standard app.
500271
@TaskAction
  public void stageAction() throws AppEngineException {
    getProject().delete(stageStandardExtension.getStagingDirectory());
    appCfg
        .newStaging(CloudSdkOperations.getDefaultHandler(getLogger()))
        .stageStandard(stageStandardExtension.toStageStandardConfiguration());
  }
197008
def main(**kwargs):
    """"""
    options = ApplicationOptions(**kwargs)
    Event.configure(is_logging_enabled=options.event_logging)
    application = Application(options)
    application.run(options.definition)
624100
def prepare_app_pipeline():
    """"""
    runner = ForemastRunner()
    runner.write_configs()
    runner.create_app()
    runner.create_pipeline()
    runner.cleanup()
189823
function task(app, name, pattern, dependencies) {
  app.task(name, dependencies || [], function(cb) {
    app.src(pattern, {cwd: __dirname})
      .pipe(app.renderFile('*'))
      .pipe(utils.condense())
      .pipe(beautify({ indent_size: 2 }))
      .pipe(app.conflicts(app.cwd))
      .pipe(app.dest(app.cwd))
      .on('error', cb)
      .on('end', function() {
        app.build('prompt-install', cb);
      })
  });
}
683053
def initiate_tasks(self):
        
        self.tasks_classes = TaskLoader().load_tasks(
            paths=self.configuration[Configuration.ALGORITHM][Configuration.TASKS][Configuration.PATHS])
1091262
function stageModels(app, models, cb) {
  logger.debug('stageModels entry');
  async.forEach(models,
    function(model, callback) {
      app.dataSources.db.automigrate(
        model.name,
        function(err) {
          callback(err);
        }
      );
    },
    function(err) {
      logger.debug('stageModels exit');
      cb(err);
    }
  );
}
1096954
def _ep_to_kv(entrypoint):
    '''
    
    '''
    cls = entrypoint.load()
    cls.name = entrypoint.name
    return (entrypoint.name, cls)
769227
@TaskAction
  public void stageAction() throws AppEngineException {
    getProject().delete(appYamlExtension.getStagingDirectory());
    getProject().mkdir(appYamlExtension.getStagingDirectory().getAbsolutePath());

    AppYamlProjectStaging staging = new AppYamlProjectStaging();
    staging.stageArchive(appYamlExtension.toAppYamlProjectStageConfiguration());
  }
1152757
def init_app(self, app,
                 entry_point_group_mappings='invenio_search.mappings',
                 entry_point_group_templates='invenio_search.templates',
                 **kwargs):
        
        self.init_config(app)

        app.cli.add_command(index_cmd)

        state = _SearchState(
            app,
            entry_point_group_mappings=entry_point_group_mappings,
            entry_point_group_templates=entry_point_group_templates,
            **kwargs
        )
        self._state = app.extensions['invenio-search'] = state
1021624
def add_entrypoint(self, entry_point_group):
        """"""
        for ep in iter_entry_points(group=entry_point_group):
            if not resource_isdir(ep.module_name, 'translations'):
                continue
            dirname = resource_filename(ep.module_name, 'translations')
            self.add_path(dirname)
1287784
def main(argv=None):
  """"""
  args = parse_arguments(sys.argv if argv is None else argv)
  temp_dir = os.path.join(args.output, 'tmp')

  if args.cloud:
    pipeline_name = 'DataflowRunner'
  else:
    pipeline_name = 'DirectRunner'
    # Suppress TF warnings.
    os.environ['TF_CPP_MIN_LOG_LEVEL']='3'

  options = {
      'job_name': args.job_name,
      'temp_location': temp_dir,
      'project': args.project_id,
      'setup_file':
          os.path.abspath(os.path.join(
              os.path.dirname(__file__),
              'setup.py')),
  }
  if args.num_workers:
    options['num_workers'] = args.num_workers
  if args.worker_machine_type:
    options['worker_machine_type'] = args.worker_machine_type

  pipeline_options = beam.pipeline.PipelineOptions(flags=[], **options)

  p = beam.Pipeline(pipeline_name, options=pipeline_options)
  preprocess(pipeline=p, args=args)
  pipeline_result = p.run()

  if not args.async:
    pipeline_result.wait_until_finish()
  if args.async and args.cloud:
    print('View job at https://console.developers.google.com/dataflow/job/%s?project=%s' %
        (pipeline_result.job_id(), args.project_id))
1070590
def main():
    """"""
    logging.basicConfig(format=LOGGING_FORMAT)
    log = logging.getLogger(__name__)

    parser = argparse.ArgumentParser()
    add_debug(parser)
    add_app(parser)
    add_env(parser)
    add_properties(parser)

    args = parser.parse_args()

    logging.getLogger(__package__.split(".")[0]).setLevel(args.debug)
    log.debug('Parsed arguements: %s', args)

    if "prod" not in args.env:
        log.info('No slack message sent, not a production environment')
    else:
        log.info("Sending slack message, production environment")
        slacknotify = SlackNotification(app=args.app, env=args.env, prop_path=args.properties)
        slacknotify.post_message()
505613
def entry_point(__func: Callable) -> Callable:
    
    if __func.__module__ == '__main__':
        import sys
        sys.exit(__func())
    else:
        return __func
690313
def init_app(self, app, entry_point_group='invenio_queues.queues'):
        """"""
        self.init_config(app)
        app.extensions['invenio-queues'] = _InvenioQueuesState(
            app,
            app.config['QUEUES_CONNECTION_POOL'],
            entry_point_group=entry_point_group
        )
        return app
102038
def init_app(self, app, entry_point_group='invenio_webhooks.receivers'):
        """"""
        self.init_config(app)
        state = _WebhooksState(app, entry_point_group=entry_point_group)
        self._state = app.extensions['invenio-webhooks'] = state
445595
def run(self):
        """"""
        self.exc = None
        try:
            self.task()
        except BaseException:
            self.exc = sys.exc_info()
1295965
def start(self):
        '''  '''
        self._app.run(host=self._host, port=self._port)