diff --git a/api/tasks.py b/api/tasks.py index 5715c9812..824bd9e69 100644 --- a/api/tasks.py +++ b/api/tasks.py @@ -1,3 +1,4 @@ +import asyncio from celery import shared_task from celery.exceptions import SoftTimeLimitExceeded @@ -260,7 +261,7 @@ def nostr_send_order_event(order_id=None): order = Order.objects.get(id=order_id) nostr = Nostr() - nostr.send_order_event(order) + asyncio.run(nostr.send_order_event(order)) return diff --git a/docker-tests.yml b/docker-tests.yml index 06dbd9398..07010344b 100644 --- a/docker-tests.yml +++ b/docker-tests.yml @@ -206,16 +206,6 @@ services: # - redis # network_mode: service:bitcoind - strfry: - build: ./docker/strfry - container_name: strfry-dev - restart: unless-stopped - volumes: - - ./test/strfry/strfry.conf:/etc/strfry.conf:ro - - ./test/strfry/onion_urls.txt:/etc/strfry/onion_urls.txt:ro - - ./test/strfry/db:/app/strfry-db:rw - network_mode: service:tor - volumes: redisdata: bitcoin: diff --git a/tests/strfry/config/strfry.conf b/tests/strfry/config/strfry.conf deleted file mode 100644 index fea0d885e..000000000 --- a/tests/strfry/config/strfry.conf +++ /dev/null @@ -1,138 +0,0 @@ -## -## Default strfry config -## - -# Directory that contains the strfry LMDB database (restart required) -db = "./strfry-db/" - -dbParams { - # Maximum number of threads/processes that can simultaneously have LMDB transactions open (restart required) - maxreaders = 256 - - # Size of mmap() to use when loading LMDB (default is 10TB, does *not* correspond to disk-space used) (restart required) - mapsize = 10995116277760 - - # Disables read-ahead when accessing the LMDB mapping. Reduces IO activity when DB size is larger than RAM. (restart required) - noReadAhead = false -} - -events { - # Maximum size of normalised JSON, in bytes - maxEventSize = 65536 - - # Events newer than this will be rejected - rejectEventsNewerThanSeconds = 900 - - # Events older than this will be rejected - rejectEventsOlderThanSeconds = 94608000 - - # Ephemeral events older than this will be rejected - rejectEphemeralEventsOlderThanSeconds = 60 - - # Ephemeral events will be deleted from the DB when older than this - ephemeralEventsLifetimeSeconds = 300 - - # Maximum number of tags allowed - maxNumTags = 2000 - - # Maximum size for tag values, in bytes - maxTagValSize = 1024 -} - -relay { - # Interface to listen on. Use 0.0.0.0 to listen on all interfaces (restart required) - bind = "0.0.0.0" - - # Port to open for the nostr websocket protocol (restart required) - port = 7777 - - # Set OS-limit on maximum number of open files/sockets (if 0, don't attempt to set) (restart required) - nofiles = 1000000 - - # HTTP header that contains the client's real IP, before reverse proxying (ie x-real-ip) (MUST be all lower-case) - realIpHeader = "" - - info { - # NIP-11: Name of this server. Short/descriptive (< 30 characters) - name = "Robosats" - - # NIP-11: Detailed information about relay, free-form - description = "Federation cache system." - - # NIP-11: Administrative nostr pubkey, for contact purposes - pubkey = "" - - # NIP-11: Alternative administrative contact (email, website, etc) - contact = "" - } - - # Maximum accepted incoming websocket frame size (should be larger than max event) (restart required) - maxWebsocketPayloadSize = 131072 - - # Websocket-level PING message frequency (should be less than any reverse proxy idle timeouts) (restart required) - autoPingSeconds = 55 - - # If TCP keep-alive should be enabled (detect dropped connections to upstream reverse proxy) - enableTcpKeepalive = false - - # How much uninterrupted CPU time a REQ query should get during its DB scan - queryTimesliceBudgetMicroseconds = 10000 - - # Maximum records that can be returned per filter - maxFilterLimit = 500 - - # Maximum number of subscriptions (concurrent REQs) a connection can have open at any time - maxSubsPerConnection = 3 - - writePolicy { - # If non-empty, path to an executable script that implements the writePolicy plugin logic - plugin = "" - } - - compression { - # Use permessage-deflate compression if supported by client. Reduces bandwidth, but slight increase in CPU (restart required) - enabled = true - - # Maintain a sliding window buffer for each connection. Improves compression, but uses more memory (restart required) - slidingWindow = false - } - - logging { - # Dump all incoming messages - dumpInAll = false - - # Dump all incoming EVENT messages - dumpInEvents = false - - # Dump all incoming REQ/CLOSE messages - dumpInReqs = false - - # Log performance metrics for initial REQ database scans - dbScanPerf = false - - # Log reason for invalid event rejection? Can be disabled to silence excessive logging - invalidEvents = true - } - - numThreads { - # Ingester threads: route incoming requests, validate events/sigs (restart required) - ingester = 3 - - # reqWorker threads: Handle initial DB scan for events (restart required) - reqWorker = 3 - - # reqMonitor threads: Handle filtering of new events (restart required) - reqMonitor = 3 - - # negentropy threads: Handle negentropy protocol messages (restart required) - negentropy = 2 - } - - negentropy { - # Support negentropy protocol messages - enabled = true - - # Maximum records that sync will process before returning an error - maxSyncEvents = 1000000 - } -}