Skip to content
Snippets Groups Projects
Commit 3e48aa29 authored by Agustin Dorda's avatar Agustin Dorda
Browse files

Para limpiar cache

parent f9e48104
No related branches found
No related tags found
No related merge requests found
import logging
from django.core.management import BaseCommand
from app.services import TransactionUnstucker, MemcachedStorage
from TsaApi.settings import GAS_PRICE
from TsaApi.settings import PENDING_TXS_MEMCACHED_KEY
class Command(BaseCommand):
unstucker = TransactionUnstucker()
logger = logging.getLogger('cmd')
storage = MemcachedStorage()
def handle(self, *args, **options):
try:
self.storage.store([])
print("Memcached sobre key {} cambiado a {}".format(PENDING_TXS_MEMCACHED_KEY,self.storage.retrieve()))
except Exception as e:
self.logger.error(str(e))
print("Hubo un error {}".format(str(e)))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment