You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometime we want ton configure the child dalec according to specific API logic. In the example above it is the action "on behalf" of someone.
However, we want something generic: an ability to pass arbitrary kwargs to the proxy.
It should live somewhere in the
defrefresh(
self,
content_type: str,
channel: Optional[str] =None,
channel_object: Optional[str] =None,
generic_kwargs: [Optional[dic]] =None, # <- here! or elsewhere in the signature...force: Optional[bool] =False,
dj_channel_obj: Optional[Model] =None,
) ->Union[Tuple[int, int, int], Tuple[Literal[False], Literal[False], Literal[False]]]:
""" Fetch updated contents from the source and update/create it into the DB. Then, if some contents has been created, delete oldests contents which are not anymore required returns number of created, updated and deleted objects or False if cache not yet expired """dalec_kwargs= {
"content_type": content_type,
"channel": channel,
"channel_object": channel_object,
"generic_kwargs": generic_kwargs# <- here!
}
And accordingly in JS / HTML.
The text was updated successfully, but these errors were encountered:
IMHO, to avoid a breaking change, you must add your new arg at the end. In next major release we will be able to refactor once the project will be mature enough.
generic_kwargs to rename into specific_proxy_kwargs because it's specific, not generic.
Initially webu/dalec-discourse#6
Sometime we want ton configure the child dalec according to specific API logic. In the example above it is the action "on behalf" of someone.
However, we want something generic: an ability to pass arbitrary kwargs to the proxy.
It should live somewhere in the
And accordingly in JS / HTML.
The text was updated successfully, but these errors were encountered: