Skip to content

Commit

Permalink
Update watcher instructions to run job-runner before server
Browse files Browse the repository at this point in the history
  • Loading branch information
prathamesh0 committed Nov 25, 2022
1 parent bb89b2d commit de15f2e
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 32 deletions.
2 changes: 1 addition & 1 deletion packages/codegen/src/templates/hooks-template.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function createInitialState (indexer: Indexer, contractAddress: str

/**
* Hook function to create state diff.
* @param indexer Indexer instance that contains methods to fetch the contract varaiable values.
* @param indexer Indexer instance that contains methods to fetch the contract variable values.
* @param blockHash Block hash of the concerned block.
*/
export async function createStateDiff (indexer: Indexer, blockHash: string): Promise<void> {
Expand Down
20 changes: 15 additions & 5 deletions packages/codegen/src/templates/readme-template.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,15 @@ To enable GQL requests caching:

## Run

* Run the watcher:
* If the watcher is a `lazy` watcher:

```bash
yarn server
```
* Run the server:

```bash
yarn server
```

GQL console: http://localhost:{{port}}/graphql
GQL console: http://localhost:{{port}}/graphql

* If the watcher is an `active` watcher:

Expand All @@ -89,6 +91,14 @@ GQL console: http://localhost:{{port}}/graphql
yarn job-runner
```

* Run the server:

```bash
yarn server
```

GQL console: http://localhost:{{port}}/graphql

* To watch a contract:

```bash
Expand Down
20 changes: 15 additions & 5 deletions packages/eden-watcher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,15 @@

## Run

* Run the watcher:
* If the watcher is a `lazy` watcher:

```bash
yarn server
```
* Run the server:

```bash
yarn server
```

GQL console: http://localhost:3012/graphql
GQL console: http://localhost:3012/graphql

* If the watcher is an `active` watcher:

Expand All @@ -77,6 +79,14 @@ GQL console: http://localhost:3012/graphql
yarn job-runner
```

* Run the server:

```bash
yarn server
```

GQL console: http://localhost:3012/graphql

* To watch a contract:

```bash
Expand Down
16 changes: 9 additions & 7 deletions packages/erc20-watcher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,26 +70,28 @@ yarn build

Run the watcher:

Start the job runner:

```bash
$ yarn server
$ yarn job-runner

# For development.
$ yarn server:dev
$ yarn job-runner:dev

# For specifying config file.
$ yarn server -f environments/local.toml
$ yarn job-runner -f environments/local.toml
```

Start the job runner:
Start the server:

```bash
$ yarn job-runner
$ yarn server

# For development.
$ yarn job-runner:dev
$ yarn server:dev

# For specifying config file.
$ yarn job-runner -f environments/local.toml
$ yarn server -f environments/local.toml
```

GQL console: http://localhost:3001/graphql
Expand Down
20 changes: 16 additions & 4 deletions packages/erc721-watcher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,15 @@ Follow the steps below or follow the [Demo](./demo.md)

* Run the watcher:

```bash
yarn server
```
* If the watcher is a `lazy` watcher:

* Run the server:

```bash
yarn server
```

GQL console: http://localhost:3006/graphql
GQL console: http://localhost:3006/graphql

* If the watcher is an `active` watcher:

Expand All @@ -85,6 +89,14 @@ GQL console: http://localhost:3006/graphql
yarn job-runner
```

* Run the server:

```bash
yarn server
```

GQL console: http://localhost:3012/graphql

* To watch a contract:

```bash
Expand Down
18 changes: 13 additions & 5 deletions packages/graph-test-watcher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@

## Run

* Run the watcher:
* Run the server:

```bash
yarn server
```
```bash
yarn server
```

GQL console: http://localhost:3008/graphql
GQL console: http://localhost:3008/graphql

* If the watcher is an `active` watcher:

Expand All @@ -79,6 +79,14 @@ GQL console: http://localhost:3008/graphql
yarn job-runner
```

* Run the server:

```bash
yarn server
```

GQL console: http://localhost:3008/graphql

* To watch a contract:

```bash
Expand Down
18 changes: 13 additions & 5 deletions packages/mobymask-watcher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@

Follow the steps below or follow the [Demo](./demo.md)

* Run the watcher:
* Run the server:

```bash
yarn server
```
```bash
yarn server
```

GQL console: http://localhost:3010/graphql
GQL console: http://localhost:3010/graphql

* If the watcher is an `active` watcher:

Expand All @@ -79,6 +79,14 @@ GQL console: http://localhost:3010/graphql
yarn job-runner
```

* Run the server:

```bash
yarn server
```

GQL console: http://localhost:3010/graphql

* To watch a contract:

```bash
Expand Down

0 comments on commit de15f2e

Please sign in to comment.