File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
deltachat-rpc-client/src/deltachat_rpc_client Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 44
55from typing import TYPE_CHECKING
66
7- from ._utils import AttrDict
7+ from ._utils import AttrDict , futuremethod
88from .account import Account
99
1010if TYPE_CHECKING :
@@ -39,6 +39,15 @@ def stop_io(self) -> None:
3939 """Stop the I/O of all accounts."""
4040 self .rpc .stop_io_for_all_accounts ()
4141
42+ @futuremethod
43+ def background_fetch (self , timeout_in_seconds : int ) -> None :
44+ """Run background fetch for all accounts."""
45+ yield self .rpc .background_fetch .future (timeout_in_seconds )
46+
47+ def stop_background_fetch (self ) -> None :
48+ """Stop ongoing background fetch."""
49+ self .rpc .stop_background_fetch ()
50+
4251 def maybe_network (self ) -> None :
4352 """Indicate that the network conditions might have changed."""
4453 self .rpc .maybe_network ()
You can’t perform that action at this time.
0 commit comments