File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/service-library/src/servicelib/celery Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 3333)
3434
3535Wildcard : TypeAlias = Literal ["*" ]
36+ WILDCARD : Final [Wildcard ] = "*"
3637
3738
3839class OwnerMetadata (BaseModel ):
@@ -47,10 +48,11 @@ class OwnerMetadata(BaseModel):
4748 class StorageOwnerMetadata(OwnerMetadata):
4849 user_id: int | Wildcard
4950 product_name: int | Wildcard
50- owner = "storage-service"
51+ owner = APP_NAME
5152
52- Listing tasks using the filter `StorageOwnerMetadata(user_id=123, product_name="*")` will return all tasks with
53- user_id 123, any product_name submitted from storage-service.
53+ Where APP_NAME is the name of the service. Listing tasks using the filter
54+ `StorageOwnerMetadata(user_id=123, product_name=WILDCARD)` will return all tasks with
55+ user_id 123, any product_name submitted from the service.
5456
5557 If the metadata schema is known, the class allows deserializing the metadata (recreate_as_model). I.e. one can recover the metadata from the task:
5658 metadata -> task_uuid -> metadata
You can’t perform that action at this time.
0 commit comments