Skip to content

Commit

Permalink
t
Browse files Browse the repository at this point in the history
  • Loading branch information
azhavoro committed Nov 12, 2024
1 parent 353a44e commit 9e7893e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cvat/apps/engine/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,15 @@ def _convert_args_for_callback(func_args: list[Any]) -> list[Any]:

return result


@attrs.define
class Callback:
_callable: Callable[..., DataWithMime]
_args: list[Any] = attrs.field(converter=_convert_args_for_callback, factory=list)
_kwargs: dict[str, Any] = attrs.Factory(dict)

def __call__(
self,
) -> Any:
def __call__(self) -> DataWithMime:
return self._callable(*self._args, **self._kwargs)


class MediaCache:
_QUEUE_NAME = settings.CVAT_QUEUES.CHUNKS.value
_QUEUE_JOB_PREFIX_TASK = "chunks:prepare-item-"
Expand Down

0 comments on commit 9e7893e

Please sign in to comment.