Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
asapo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joao Alvim Oliveira Dias De Almeida
asapo
Commits
42d8f05c
Commit
42d8f05c
authored
11 months ago
by
Tim Schoof
Browse files
Options
Downloads
Patches
Plain Diff
Fix doctstring for create_consumer/create_producer
parent
05c67ed4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
consumer/api/python/asapo_consumer.pyx.in
+7
-9
7 additions, 9 deletions
consumer/api/python/asapo_consumer.pyx.in
producer/api/python/asapo_producer.pyx.in
+2
-0
2 additions, 0 deletions
producer/api/python/asapo_producer.pyx.in
with
9 additions
and
9 deletions
consumer/api/python/asapo_consumer.pyx.in
+
7
−
9
View file @
42d8f05c
...
...
@@ -448,8 +448,8 @@ cdef class PyConsumer:
if op == "next":
with nogil:
dataset = self.c_consumer.get().GetNextDataset(b_group_id, min_size,b_stream,&err)
elif op == "next_available":
dataset = self.c_consumer.get().GetNextDataset(b_group_id, min_size,b_stream,True,&err)
elif op == "next_available":
dataset = self.c_consumer.get().GetNextDataset(b_group_id, min_size,b_stream,True,&err)
elif op == "last" and group_id == "":
with nogil:
dataset = self.c_consumer.get().GetLastDataset(min_size,b_stream, &err)
...
...
@@ -468,9 +468,9 @@ cdef class PyConsumer:
return res
def get_next_dataset(self, group_id, min_size = 0, stream = "default", ordered=True):
""" Return dataset, as a list of substream-messages metadata, that corresponds to different
substreams of a given dataset. Each metadata is a python dict, that
substreams of a given dataset. Each metadata is a python dict, that
contains user part (if given) and service part. Corresponding data can be retrieved
via `retrieve_data` function.
via `retrieve_data` function.
Function iterates across stream for given consumer group (create one, if not exists).
For each consumer group each message will be returned only once.
...
...
@@ -492,7 +492,7 @@ cdef class PyConsumer:
if ordered:
return self._op_dataset("next_available",group_id,stream,min_size,0)
else:
return self._op_dataset("next",group_id,stream,min_size,0)
return self._op_dataset("next",group_id,stream,min_size,0)
def get_last_dataset(self, min_size = 0, stream = "default", group_id = ""):
return self._op_dataset("last",group_id,stream,min_size,0)
def get_dataset_by_id(self, uint64_t id, min_size = 0, stream = "default"):
...
...
@@ -552,14 +552,12 @@ def create_consumer(server_name,source_path,has_filesystem,beamtime_id,data_sour
:type source_path: string
:param has_filesystem: True if the source_path is accessible for client, otherwise will use file asapo transfer service to get data
:type has_filesystem: bool
:param beam
line: beamline name, can be "auto" if beamtime_id is given
:type beam
line
: string
:param beam
time_id: ID of the beamtime the data belongs to
:type beam
time_id
: string
:param data_source: name of the data source that produces data
:type data_source: string
:param token: authorization token
:type token: string
:param nthreads: ingest mode flag
:type nthreads: int
:param timeout_ms: send requests timeout in milliseconds
:type timeout_ms: int
:param instance_id: instance id, can be "auto" (default), will create a combination out of hostname and pid
...
...
This diff is collapsed.
Click to expand it.
producer/api/python/asapo_producer.pyx.in
+
2
−
0
View file @
42d8f05c
...
...
@@ -472,6 +472,8 @@ def create_producer(endpoint,type,beamtime_id,beamline,data_source,token,nthread
:type endpoint: string
:param type: source type, "raw" to write to "raw" folder in beamline filesystem,"processed" to write to "processed" folder in core filesystem
:type type: string
:param beamtime_id: ID of the beamtime the data belongs to, can be "auto" if beamline is given
:type beamtime_id: string
:param beamline: beamline name, can be "auto" if beamtime_id is given
:type beamline: string
:param data_source: name of the data source that produces data
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment