storage.clock.seconds() -> asyncio.get_running_loop().time()

This commit is contained in:
Lex Berezhny 2019-01-07 17:42:50 -05:00
parent d30e7cd29e
commit 71a0c704bd

View file

@ -1,3 +1,4 @@
import asyncio
import logging import logging
import os import os
from binascii import unhexlify from binascii import unhexlify
@ -69,8 +70,9 @@ class DiskBlobManager:
return f2d(self.storage.count_should_announce_blobs()) return f2d(self.storage.count_should_announce_blobs())
def set_should_announce(self, blob_hash, should_announce): def set_should_announce(self, blob_hash, should_announce):
now = self.storage.clock.seconds() return f2d(self.storage.set_should_announce(
return f2d(self.storage.set_should_announce(blob_hash, now, should_announce)) blob_hash, asyncio.get_running_loop().time(), should_announce
))
def get_should_announce(self, blob_hash): def get_should_announce(self, blob_hash):
return f2d(self.storage.should_announce(blob_hash)) return f2d(self.storage.should_announce(blob_hash))