Skip to content

Commit

Permalink
New: adds arbitrage
Browse files Browse the repository at this point in the history
  • Loading branch information
pustovitDmytro committed Aug 17, 2022
1 parent b9b1a55 commit 171853d
Show file tree
Hide file tree
Showing 25 changed files with 761 additions and 665 deletions.
18 changes: 18 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ aliases:
- lib

version: 2.1
orbs:
aws-cli: circleci/aws-cli@3.1
debug: true
jobs:
danger-pr:
Expand Down Expand Up @@ -168,6 +170,15 @@ jobs:
- run:
name: Create Release
command: if [ -z ${CIRCLE_SKIP_DEPLOY+x} ]; then npm run semantic-release;else echo 'job skipped';fi
aws-update:
environment:
- AWS_DEFAULT_REGION: eu-west-1
executor: aws-cli/default
steps:
- checkout
- aws-cli/setup
- run: aws ecs update-service --cluster default --service ianus-worker --force-new-deployment
- run: aws ecs update-service --cluster default --service ianus-admin --force-new-deployment

workflows:
version: 2
Expand Down Expand Up @@ -201,6 +212,13 @@ workflows:
filters:
branches:
only: master
- aws-update:
context: aws
requires:
- deploy
filters:
branches:
only: master
pr:
jobs:
- danger-pr:
Expand Down
16 changes: 15 additions & 1 deletion .env.defaults
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
ARBITRAGE_QUEUE_NAME='arbitrage-main'
ARBITRAGE_QUEUE_REPEAT='10 * * * *'
ARBITRAGE_QUEUE_TTL='30s'
ARBITRAGE_QUEUE_ATTEMPTS=2
ARBITRAGE_QUEUE_BACKOFF_TYPE=exponential
ARBITRAGE_QUEUE_BACKOFF_DELAY='10s'
ARBITRAGE_QUEUE_CONCURRENCY=1
ARBITRAGE_QUEUE_LOG_LEVEL=info
ARBITRAGE_QUEUE_PROCESS=true
ARBITRAGE_QUEUE_KEEP_LAST=100

BINANCE_P2P_QUEUE_NAME='binance-p2p-main'
BINANCE_P2P_QUEUE_REPEAT='* * * * *'
BINANCE_P2P_QUEUE_TTL='30s'
Expand Down Expand Up @@ -87,4 +98,7 @@ P2P_ALARM_CACHE_PREFIX="ianus_p2p_cache_"
P2P_ALARM_CACHE_TTL="30min"

EARN_ALARM_CACHE_PREFIX="ianus_earn_cache_"
EARN_ALARM_CACHE_TTL="6h"
EARN_ALARM_CACHE_TTL="6h"

ARBITRAGE_ALARM_CACHE_PREFIX="ianus_arbitrage_cache_"
ARBITRAGE_ALARM_CACHE_TTL="8h"
8 changes: 4 additions & 4 deletions .nycrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
],
"report-dir": "./reports/coverage",
"temp-dir": "./reports/coverage",
"lines": 98,
"statements": 97,
"functions": 94,
"branches": 82,
"lines": 92,
"statements": 91,
"functions": 88,
"branches": 76,
"check-coverage": true
}
Loading

0 comments on commit 171853d

Please sign in to comment.