File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 22
33Please use [ this] ( https://docs.gitlab.com/ee/development/changelog.html ) document as guidelines to keep a changelog.
44
5+ ## 4.2.2 - 2022-02-01
6+
7+ ### Fixed
8+
9+ * config: Fixed ` ipfs ` datasource config.
10+
511## 4.2.1 - 2022-01-31
612
713### Fixed
Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ def valid_address(cls, v):
194194 return v
195195
196196
197- # NOTE: Don't forget `http` in all datasource configs
197+ # NOTE: Don't forget `http` and `__hash__` in all datasource configs
198198@dataclass
199199class TzktDatasourceConfig (NameMixin ):
200200 """TzKT datasource config
@@ -287,12 +287,16 @@ class IpfsDatasourceConfig(NameMixin):
287287 url : str = DEFAULT_IPFS_URL
288288 http : Optional [HTTPConfig ] = None
289289
290+ def __hash__ (self ):
291+ return hash (self .kind + self .url )
292+
290293
291294DatasourceConfigT = Union [
292295 TzktDatasourceConfig ,
293296 BcdDatasourceConfig ,
294297 CoinbaseDatasourceConfig ,
295298 MetadataDatasourceConfig ,
299+ IpfsDatasourceConfig ,
296300]
297301
298302
Original file line number Diff line number Diff line change 1+ import logging
12from typing import Any
3+ from typing import Optional
24
35from dipdup .config import HTTPConfig
46from dipdup .datasources .datasource import Datasource
@@ -9,6 +11,10 @@ class IpfsDatasource(Datasource):
911 retry_count = 1 ,
1012 )
1113
14+ def __init__ (self , url , http_config : Optional [HTTPConfig ] = None ) -> None :
15+ super ().__init__ (url , self ._default_http_config .merge (http_config ))
16+ self ._logger = logging .getLogger ('dipdup.ipfs' )
17+
1218 async def run (self ) -> None :
1319 pass
1420
You can’t perform that action at this time.
0 commit comments