Skip to content

Commit

Permalink
refactor: rename package to processing
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnigir1 committed Nov 5, 2024
1 parent 8b5afdb commit a6c3566
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 13 deletions.
File renamed without changes.
10 changes: 5 additions & 5 deletions apps/processor/README.md → apps/processing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This service is the main application that runs the core processing pipeline:

### ⚙️ Setting up env variables

- Create `.env` file and copy paste `.env.example` content in there.
- Create `.env` file and copy paste `.env.example` content in there or run the following command:

```
$ cp .env.example .env
Expand All @@ -28,15 +28,15 @@ Available options:
|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------|-----------|----------------------------------|-----------------------------------------------------------------|
| `RPC_URLS` | Array of RPC URLs | N/A | Yes | Multiple URLs for redundancy |
| `CHAIN_ID` | Chain ID | N/A | Yes | At the moment only Optimism is supported (10) |
| `FETCH_LIMIT` | Maximum number of items to fetch in one batch | 500 | Yes | |
| `FETCH_DELAY_MS` | Delay between fetch operations in milliseconds | 3000 | Yes | |
| `FETCH_LIMIT` | Maximum number of items to fetch in one batch | 500 | No | |
| `FETCH_DELAY_MS` | Delay between fetch operations in milliseconds | 1000 | No | |
| `DATABASE_URL` | PostgreSQL Data Layer database connection URL | N/A | Yes | |
| `DATABASE_SCHEMA` | PostgreSQL Data Layer database schema name | chainDataSchema | Yes | |
| `DATABASE_SCHEMA` | PostgreSQL Data Layer database schema name | public | Yes | |
| `INDEXER_GRAPHQL_URL` | GraphQL endpoint for the indexer | N/A | Yes | |
| `INDEXER_ADMIN_SECRET` | Admin secret for indexer authentication | N/A | Yes | |
| `IPFS_GATEWAYS_URL` | Array of IPFS gateway URLs | N/A | Yes | Multiple gateways for redundancy |
| `COINGECKO_API_KEY` | API key for CoinGecko service | N/A | Yes | |
| `COINGECKO_API_TYPE` | CoinGecko API tier (demo or pro) | N/A | Yes | |
| `COINGECKO_API_TYPE` | CoinGecko API tier (demo or pro) | pro | No | |

## Available Scripts

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ const stringToJSONSchema = z.string().transform((str, ctx): z.infer<ReturnType<t
const validationSchema = z.object({
RPC_URLS: stringToJSONSchema.pipe(z.array(z.string().url())),
CHAIN_ID: z.coerce.number().int().positive(),
FETCH_LIMIT: z.coerce.number().int().positive().default(1000),
FETCH_DELAY_MS: z.coerce.number().int().positive().default(10000),
FETCH_LIMIT: z.coerce.number().int().positive().default(500),
FETCH_DELAY_MS: z.coerce.number().int().positive().default(1000),
DATABASE_URL: z.string(),
DATABASE_SCHEMA: z.string().default("public"),
INDEXER_GRAPHQL_URL: z.string().url(),
INDEXER_ADMIN_SECRET: z.string(),
COINGECKO_API_KEY: z.string(),
COINGECKO_API_TYPE: z.enum(["demo", "pro"]).default("demo"),
COINGECKO_API_TYPE: z.enum(["demo", "pro"]).default("pro"),
IPFS_GATEWAYS_URL: stringToJSONSchema
.pipe(z.array(z.string().url()))
.default('["https://ipfs.io"]'),
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions apps/processor/src/index.ts → apps/processing/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { inspect } from "util";

import { environment } from "./config/index.js";
import { ProcessorService } from "./services/processor.service.js";
import { ProcessingService } from "./services/processing.service.js";

let processor: ProcessorService;
let processor: ProcessingService;

const main = async (): Promise<void> => {
processor = new ProcessorService(environment);
processor = new ProcessingService(environment);
await processor.start();
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./sharedDependencies.service.js";
export * from "./processor.service.js";
export * from "./processing.service.js";
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { SharedDependencies, SharedDependenciesService } from "./index.js";
*
* TODO: support multichain
*/
export class ProcessorService {
export class ProcessingService {
private readonly logger = Logger.getInstance();
private readonly orchestrator: Orchestrator;
private readonly kyselyDatabase: SharedDependencies["kyselyDatabase"];
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a6c3566

Please sign in to comment.