|
|
# Auction Service
|
|
|
## Description
|
|
|
A Service that provide opportunity to post/cancel bids and in real-time observing of auction passing.
|
|
|
|
|
|
# How to run locally
|
|
|
## Requirements
|
|
|
* Make
|
|
|
* Docker
|
|
|
* Docker-compose
|
|
|
|
|
|
### Run auction service
|
|
|
`make run` - to run auction service or `make` and `run` will be executed by default.
|
|
|
|
|
|
**Troubleshooting**
|
|
|
If you see that container of auction-api is down. You probably will se in logs something like that
|
|
|
```
|
|
|
raise NotMasterError(errmsg, response)
|
|
|
pymongo.errors.NotMasterError: node is not in primary or recovering state, full error: {'errorLabels': ['ResumableChangeStreamError'], 'topologyVersion': {'processId': ObjectId('6051aeef70b908f4d4aa6594'), 'counter': 0}, 'operationTime': Timestamp(0, 0), 'ok': 0.0, 'errmsg': 'node is not in primary or recovering state', 'code': 13436, 'codeName': 'NotPrimaryOrSecondary', '$clusterTime': {'clusterTime': Timestamp(0, 0), 'signature': {'hash': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'keyId': 0}}}
|
|
|
```
|
|
|
That mean you need to initiate [mongo replica-set](https://docs.mongodb.com/manual/replication/) in your mongo_db container.
|
|
|
|
|
|
To do that run mongo in your mongo_db container and execute the [command bellow](https://docs.mongodb.com/manual/reference/method/rs.initiate/)
|
|
|
|
|
|
`rs.initiate()`
|
|
|
|
|
|
**Tips**
|
|
|
To run service with logs use `make logs`
|
|
|
|
|
|
More about `make` command you can see [here](Makefile)
|
|
|
|
|
|
# Auction Types
|
|
|
* [Green](Green-Auction) [deprecated]
|
|
|
* [English](English-Auction)
|
|
|
* [Dutch](Dutch-Auction)
|
|
|
* [MultiAwards](MultiAwards-Auction)
|
|
|
* [MultiAwards-desc](MultiAwards-desc-Auction)
|
|
|
* [PriorityEnglish](PriorityEnglish-Auction)
|
|
|
|
|
|
## Versioning
|
|
|
Auction service using [semantic versioning](https://semver.org/lang/ru/).
|
|
|
|
|
|
That means versions have next look - `3.X.Y` where:
|
|
|
* `3` - CDB (central data base) version.
|
|
|
* `X` - using for planed releases.
|
|
|
* `Y` - using for hot-fix releases.
|
|
|
|
|
|
More about `how to tag auction module` you can find in the [`Makefile`](Makefile) page
|
|
|
### Useful links:
|
|
|
* [Manual how to add new auction](How-to-add-new-Auction%3F)
|
|
|
|
|
|
* [About rules](Auction-Rules)
|
|
|
|
|
|
* [About states](Auction-States)
|
|
|
|
|
|
* [About auction specs](Auction-Specs) |
|
|
\ No newline at end of file |