Skip to content

WP-CLI: Should there be a time limit? #440

@joshbetz

Description

@joshbetz

Should commands be allowed to run for an unlimited amount of time? If so, we can close this. Otherwise we need to keep track of how long a command has been running for and cancel it after some timeout. We can test with the following command:

WP_CLI::add_command( 'test memory', function() {
    while( true ) {
        WP_CLI::line( sprintf( '%d minutes', $i++ ) );
        sleep( 60 );
    }
} );

We probably want any timeout to be pretty long, but actually letting things run forever is sub-optimal.

Related: #361

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions