class documentation
class Service(object): (source)
Known subclasses: fiftyone.core.service.MultiClientService
, fiftyone.core.service.ServerService
Interface for FiftyOne services.
All services must define a command property.
Services are run in an isolated Python subprocess (see service/main.py) to ensure that they are shut down when the main Python process exits. The command and working_dir properties control the execution of the service in the subprocess.
Method | __del__ |
Stops the service. |
Method | __init__ |
Undocumented |
Method | start |
Starts the service. |
Method | stop |
Stops the service. |
Method | wait |
Waits for the service to exit and returns its exit code. |
Class Variable | allow |
Undocumented |
Class Variable | service |
Undocumented |
Class Variable | working |
Undocumented |
Instance Variable | child |
Undocumented |
Property | command |
Undocumented |
Property | env |
Undocumented |
Method | _wait |
Waits for any child process of this service to bind to a TCP port. |
Instance Variable | _disabled |
Undocumented |
Instance Variable | _system |
Undocumented |
Property | _service |
Arguments passed to the service entrypoint. |
Waits for any child process of this service to bind to a TCP port.
Parameters | |
port:None | if specified, wait for a child to bind to this port |
timeout:60 | the number of seconds to wait before failing |
Returns | |
the port the child has bound to (equal to the port argument if specified) | |
Raises | |
ServiceListenTimeout | if the timeout was exceeded |