From a7705d872a59507da9fe42facd1ebd7a61c51a6b Mon Sep 17 00:00:00 2001 From: karnem <mikhail.karnevskiy@desy.de> Date: Fri, 1 Dec 2023 10:46:12 +0100 Subject: [PATCH] Add some docs-clarification to work with streams --- consumer/api/python/asapo_consumer.pyx.in | 28 +++++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/consumer/api/python/asapo_consumer.pyx.in b/consumer/api/python/asapo_consumer.pyx.in index c9c330289..308c1734f 100644 --- a/consumer/api/python/asapo_consumer.pyx.in +++ b/consumer/api/python/asapo_consumer.pyx.in @@ -301,7 +301,9 @@ cdef class PyConsumer: 'finished': False, # Value of the stream-finish flag 'nextStream': ''} # Name of the next stream - Name of the next stream is taken from the stream-finish-flag message given by client. If this information is not given, field is empty. + Name of the next stream is taken from the stream-finish-flag message given by client. + If this information is not given, field is empty. Stream in asapo presented by the collection of messages, + which contains al least one message. If only stream metadata exists, stream would be not in the list of streams. :param from_stream: name of stream to cut list of streams :type from_stream: string @@ -369,15 +371,21 @@ cdef class PyConsumer: return id def delete_stream(self, stream = 'default', bool error_on_not_exist = True): - """ - :param stream: stream name - :type stream: string - :param error_on_not_exist: will emit AsapoWrongInputError if set to true and tries to delete non-existing stream - :type error_on_not_exist: bool - :raises: - AsapoWrongInputError: wrong input (authorization, ...) - AsapoTimeoutError: request not finished for a given timeout - AsapoProducerError: other errors + """ Delete stream from the asapo database. + + Function deletes stream footprint from asapo database. This include stream + message metadata and stream metadata. Files on disc are still untouched. + Function is not blocking, while request performs asynchronously. + If one want to see the effect of this action (e.g. on request of the stream list), + wait for a bit. + + :param stream: stream name + :type stream: string + :param error_on_not_exist: will emit AsapoWrongInputError if set to true and tries to delete non-existing stream + :type error_on_not_exist: bool + :raises: + :AsapoWrongInputError: wrong input (authorization, non-existing stream, ...) + :AsapoTimeoutError: request not finished for a given consumer timeout """ cdef Error err cdef DeleteStreamOptions opts -- GitLab