(parameters)
return fail_later
Sometimes, a server goes into "active", but later (for unknown reasons)
    goes into "error"; presumably due to a hardware failure or similar
    operational issue.

    Takes one parameter:

    ``"duration"`` which is a Number, the duration of the time spent in the
    ``ACTIVE`` state.
Sometimes, a server goes into "active", but later (for unknown reasons)
    goes into "error"; presumably due to a hardware failure or similar
    operational issue.
Sometimes a server goes into active but later ( for unknown reasons ) goes into error ; presumably due to a hardware failure or similar operational issue .
def active_then_error(parameters):
    """
    Sometimes, a server goes into "active", but later (for unknown reasons)
    goes into "error"; presumably due to a hardware failure or similar
    operational issue.

    Takes one parameter:

    ``"duration"`` which is a Number, the duration of the time spent in the
    ``ACTIVE`` state.
    """
    duration = parameters["duration"]

    @default_with_hook
    def fail_later(server):
        server.update_status(u"ACTIVE")
        server.collection.clock.callLater(
            duration,
            server.update_status,
            u"ERROR")
    return fail_later
def active_then_error ( parameters ) : duration = parameters [ "duration" ] @ default_with_hook def fail_later ( server ) : server . update_status ( u"ACTIVE" ) server . collection . clock . callLater ( duration , server . update_status , u"ERROR" ) return fail_later