Registration for built-in Storm commands.
344719
def _initStormCmds(self):
        '''
        
        '''
        self.addStormCmd(s_storm.MaxCmd)
        self.addStormCmd(s_storm.MinCmd)
        self.addStormCmd(s_storm.HelpCmd)
        self.addStormCmd(s_storm.IdenCmd)
        self.addStormCmd(s_storm.SpinCmd)
        self.addStormCmd(s_storm.SudoCmd)
        self.addStormCmd(s_storm.UniqCmd)
        self.addStormCmd(s_storm.CountCmd)
        self.addStormCmd(s_storm.GraphCmd)
        self.addStormCmd(s_storm.LimitCmd)
        self.addStormCmd(s_storm.SleepCmd)
        self.addStormCmd(s_storm.DelNodeCmd)
        self.addStormCmd(s_storm.MoveTagCmd)
        self.addStormCmd(s_storm.ReIndexCmd)
690620
def register(self, command):
        
        command = command()
        if command.name in self.commands:
            raise ConsoleError(
                "Command %s already registered!" % command.name
            )

        command.create_parser(self.subparsers)
        self.commands[command.name] = command
189315
def register(keyword, command)
      @aliases.register(keyword.to_sym) do
        lambda do |args|
          # directly execute shell commands
          if command.start_with?("!")
            return Util::SafeExec.exec "#{command[1..-1]} #{args.join(" ")}".strip
          end

          return CLI.new(command.split.concat(args), @env).execute
        end
      end
    end
1165205
private function registerCommands()
    {
        $this->app['commands.drawbridge.migrations'] = $this->app->share(function($app)
        {
            return new MigrationsCommand($app);
        });

        $this->commands(
            array(
                 'commands.drawbridge.migrations'
            )
        );
    }
288013
private function registerEventMakeCommand()
    {
        $this->app->bindShared('command.make.package.event', function ($app)
        {
            return new EventMakeCommand($app['files'], $app['packages']);
        });

        $this->commands('command.make.package.event');
    }
759828
def _initStormLibs(self):
        '''
        
        '''
        self.addStormLib(('str',), s_stormtypes.LibStr)
        self.addStormLib(('time',), s_stormtypes.LibTime)
813299
def register(self, arguments=list()):
        
        target_name = self.target_name
        if target_name in ['memory.usage_in_bytes', 'memory.memsw.usage_in_bytes']:
            threshold = arguments[0]
            line = "%d %d %d\0" % (self.event_fd, self.target_fd, long(threshold))
        elif target_name in ['memory.pressure_level']:
            threshold = arguments[0]
            line = "%d %d %s\0" % (self.event_fd, self.target_fd, threshold)
        else:
            line = "%d %d\0" % (self.event_fd, self.target_fd)
        os.write(self.ec_fd, line)
384815
protected function registerMultiSiteConsoleCommands()
    {
        $this->commands([
            Console\TenantListCommand::class,
            Console\TenantRouteListCommand::class,
            Console\TenantRouteCacheCommand::class,
            Console\TenantRouteClearCommand::class,
        ]);
    }
1102720
public function registerConsoleCommands()
    {
        $this->commands([
            \Plank\Mediable\Commands\ImportMediaCommand::class,
            \Plank\Mediable\Commands\PruneMediaCommand::class,
            \Plank\Mediable\Commands\SyncMediaCommand::class,
        ]);
    }
765551
protected void fireCommandRegistered(AbstractCommand command) {
        
        Assert.notNull(command, "command");
        
        if (commandRegistryListeners.isEmpty()) {
            return;
        }
        
        CommandRegistryEvent event = new CommandRegistryEvent(this, command);
        
        for (Iterator i = commandRegistryListeners.iterator(); i.hasNext();) {
            ((CommandRegistryListener)i.next()).commandRegistered(event);
        }
        
    }
633330
private void setupStormCode(String topologyId, String tmpJarLocation,
                                Map<Object, Object> stormConf, StormTopology topology, boolean update)
            throws Exception {
        String codeKey = StormConfig.master_stormcode_key(topologyId);
        String confKey = StormConfig.master_stormconf_key(topologyId);
        String codeKeyBak = StormConfig.master_stormcode_bak_key(topologyId);

        // in local mode there is no jar
        if (tmpJarLocation != null) {
            setupJar(tmpJarLocation, topologyId, update);
        }

        if (update) {
            backupBlob(codeKey, codeKeyBak, topologyId);
        }
        createOrUpdateBlob(confKey, Utils.serialize(stormConf), update, topologyId);
        createOrUpdateBlob(codeKey, Utils.serialize(topology), update, topologyId);
    }
1139566
function registerTask( task ) {
		grunt.registerMultiTask( task.name, task.help, function () {
			var done = this.async();
			if ( ensureSketchtool() ) {
				var options = this.options();

				var commands = [];
				this.files.forEach( function( file ) {
					file.src.filter( function ( src ) {
						var command = createCommand( task, src, file.dest, options );
						if ( command ) {
							commands.push( command );
						}
					} );
				});
				
				async.eachLimit( commands, numCPUs, function ( command, next ) {
					executeCommand( command, next );
				}, done );
			} else {
				done(false);
			}
		} );
	}
547549
protected function registerCommands()
    {
        $this->app['iverberk.larasearch.commands.reindex'] = $this->app->share(function ($app)
        {
            return new ReindexCommand();
        });

        $this->app['iverberk.larasearch.commands.paths'] = $this->app->share(function ($app)
        {
            return new PathsCommand();
        });

        $this->commands('iverberk.larasearch.commands.reindex');
        $this->commands('iverberk.larasearch.commands.paths');
    }
126657
protected function registerConsoleCommands(): void
    {
        if ($this->app->runningInConsole()) {
            $this->app->bind('command.ban:delete-expired', DeleteExpiredBans::class);

            $this->commands([
                'command.ban:delete-expired',
            ]);
        }
    }
1183037
def events
      runtime.event_bus.register(
        :command_started,
        proc do |event|
          runtime.announcer.announce :command, event.entity.commandline
          runtime.announcer.announce :timeout, 'exit', event.entity.exit_timeout
          runtime.announcer.announce :timeout, 'io wait', event.entity.io_wait_timeout
          runtime.announcer.announce :wait_time, 'startup wait time', event.entity.startup_wait_time
          runtime.announcer.announce :full_environment, event.entity.environment
        end
      )

      runtime.event_bus.register(
        :command_started,
        proc do |event|
          runtime.command_monitor.register_command event.entity
          runtime.command_monitor.last_command_started = event.entity
        end
      )

      runtime.event_bus.register(
        :command_stopped,
        proc do |event|
          runtime.announcer.announce(:stdout) { event.entity.stdout }
          runtime.announcer.announce(:stderr) { event.entity.stderr }
          runtime.announcer.announce(:command_content) { event.entity.content }
          runtime.announcer.announce(:command_filesystem_status) { event.entity.filesystem_status }
        end
      )

      runtime.event_bus.register(
        :command_stopped,
        proc do |event|
          runtime.command_monitor.last_command_stopped = event.entity
        end
      )

      runtime.event_bus.register(
        [:changed_environment_variable, :added_environment_variable, :deleted_environment_variable],
        proc do |event|
          runtime.announcer.announce :changed_environment, event.entity[:changed][:name], event.entity[:changed][:value]
          runtime.announcer.announce :environment, event.entity[:changed][:name], event.entity[:changed][:value]
        end
      )

      runtime.event_bus.register(
        :changed_working_directory,
        proc { |event| runtime.announcer.announce :directory, event.entity[:new] }
      )

      runtime.event_bus.register(
        :changed_configuration,
        proc { |event| runtime.announcer.announce :configuration, event.entity[:changed][:name], event.entity[:changed][:value] }
      )
    end
1008986
void prepare(Map stormConf, TopologyContext context, OutputCollector collector,
                 KeyValueState<TaskStream, WindowState> windowState) {
        init(stormConf, context, collector, windowState);
        super.prepare(stormConf, context, collector);
    }
495590
private function registerArtisanCommands() {
        $this->commands([
            \BackupManager\Laravel\Laravel4DbBackupCommand::class,
            \BackupManager\Laravel\Laravel4DbRestoreCommand::class,
            \BackupManager\Laravel\Laravel4DbListCommand::class
        ]);
    }