Git Product home page Git Product logo

finra-short-api's Introduction

Hi there ๐Ÿ‘‹

My name is Sam Gozman, 27yo ๐Ÿ‡ฎ๐Ÿ‡ฑ, speaking in en & ru. I started programming at the age of 12 and have been working full-time as a backend developer since 2016, mainly in the fintech sector. My main programming languages are Golang, TypeScript and Rust. I have been a member of the GitHub open-source community for a long time :)

If you are interested in learning more about me, my OSS projects or reading a dev blog that I've rebuilt recently - I encourage you to visit my website: ๐Ÿ‘จโ€๐Ÿ’ป https://gozman.space

๐Ÿ“ซ How to reach me: Telegram (preferably), Email

๐Ÿ“‡ LinkedIn: in/samgozman

Anurag's GitHub stats Top Langs

finra-short-api's People

Contributors

dependabot[bot] avatar samgozman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

oskarhulter

finra-short-api's Issues

Restart last update process

Restar the last filter update process if it was interrupted before its completion. (for example, when PM2 restarts the application without my request and does not write logs about it)

[bug] Error on each request

After latest dep updates

finra-api_1  | This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
finra-api_1  | Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
finra-api_1  |     at new NodeError (node:internal/errors:371:5)
finra-api_1  |     at ServerResponse.setHeader (node:_http_outgoing:576:11)
finra-api_1  |     at ServerResponse.header (/app/node_modules/express/lib/response.js:776:10)
finra-api_1  |     at ServerResponse.send (/app/node_modules/express/lib/response.js:170:12)
finra-api_1  |     at ServerResponse.json (/app/node_modules/express/lib/response.js:267:15)
finra-api_1  |     at ExpressAdapter.reply (/app/node_modules/@nestjs/platform-express/adapters/express-adapter.js:42:62)
finra-api_1  |     at ExceptionsHandler.handleUnknownError (/app/node_modules/@nestjs/core/exceptions/base-exception-filter.js:38:24)
finra-api_1  |     at ExceptionsHandler.catch (/app/node_modules/@nestjs/core/exceptions/base-exception-filter.js:17:25)
finra-api_1  |     at ExceptionsHandler.next (/app/node_modules/@nestjs/core/exceptions/exceptions-handler.js:16:20)
finra-api_1  |     at /app/node_modules/@nestjs/core/router/router-proxy.js:24:35
finra-api_1  |     at Layer.handle_error (/app/node_modules/express/lib/router/layer.js:71:5)
finra-api_1  |     at trim_prefix (/app/node_modules/express/lib/router/index.js:321:13)
finra-api_1  |     at /app/node_modules/express/lib/router/index.js:284:7
finra-api_1  |     at Function.process_params (/app/node_modules/express/lib/router/index.js:341:12)
finra-api_1  |     at next (/app/node_modules/express/lib/router/index.js:275:10)
finra-api_1  |     at Layer.handle_error (/app/node_modules/express/lib/router/layer.js:67:12)

Log progress

Modify nestjs logger to be able to track updater progress

Jest spy test

Run unit tests with jest spy methods in void functions to check values inside the process.

[bug] Filters updating process don't start automatically

After the first error on the presence of duplicate documents in the process of updating the database, the cron process ends. Theoretically, because of this, the process of updating filters does not start.

{"log":"\u001b[33m[Nest] 25  - \u001b[39m05/05/2022, 1:30:00 AM \u001b[33m   WARN\u001b[39m \u001b[38;5;3m[CollectionController] \u001b[39m\u001b[33m(ยฌ_ยฌ) CRON updater task has started\u001b[39m\n","stream":"stdout","time":"2022-05-04T22:30:00.030188805Z"}
{"log":"\u001b[33m[Nest] 25  - \u001b[39m05/05/2022, 1:30:00 AM \u001b[33m   WARN\u001b[39m \u001b[38;5;3m[CollectionService] \u001b[39m\u001b[33mFetching last day data from FINRA has started\u001b[39m\n","stream":"stdout","time":"2022-05-04T22:30:00.030579406Z"}
{"log":"\u001b[32m[Nest] 25  - \u001b[39m05/05/2022, 1:30:17 AM \u001b[32m    LOG\u001b[39m \u001b[38;5;3m[CollectionService] \u001b[39m\u001b[32mfillDataBase: first duplication error. Data recording is stopped\u001b[39m\n","stream":"stdout","time":"2022-05-04T22:30:17.379451092Z"}
{"log":"\u001b[32m[Nest] 25  - \u001b[39m05/05/2022, 1:30:17 AM \u001b[32m    LOG\u001b[39m \u001b[38;5;3m[CollectionService] \u001b[39m\u001b[32mFetching last day data from FINRA has finished\u001b[39m\n","stream":"stdout","time":"2022-05-04T22:30:17.380016141Z"}
{"log":"\u001b[32m[Nest] 25  - \u001b[39m05/05/2022, 1:30:17 AM \u001b[32m    LOG\u001b[39m \u001b[38;5;3m[CollectionController] \u001b[39m\u001b[32m(ยฌ_ยฌ) CRON updater task has finished\u001b[39m\n","stream":"stdout","time":"2022-05-04T22:30:17.38044083Z"}

abnormalVolumeFilter error on update

Error while filters update

0|finra-sh | [Nest] 133516  - 09/27/2021, 8:30:46 AM   ERROR [FilterUnitService] Error in abnormalVolumeFilter
0|finra-sh | [Nest] 133516  - 09/27/2021, 8:30:46 AM   ERROR [FilterUnitService] MongoNetworkTimeoutError: connection timed out
0|finra-sh | [Nest] 133516  - 09/27/2021, 8:30:46 AM   ERROR [FiltersService] Error in updateAll
0|finra-sh | [Nest] 133516  - 09/27/2021, 8:30:46 AM   ERROR [FiltersService] InternalServerErrorException: Internal Server Error
0|finra-sh | [Nest] 133516  - 09/27/2021, 8:30:46 AM   ERROR [FilterUnitService] Error in abnormalVolumeFilter
0|finra-sh | [Nest] 133516  - 09/27/2021, 8:30:46 AM   ERROR [FilterUnitService] MongoNetworkTimeoutError: connection timed out

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.