Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit c2766f2

Browse files
change all analyse -> analyze
1 parent b47aab7 commit c2766f2

File tree

13 files changed

+76
-67
lines changed

13 files changed

+76
-67
lines changed

src/pages/batch.mdx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,15 @@ Within a Batch we create Job Definitions, by creating a new Job with a unique na
5656
```typescript
5757
import { job, JobContext } from '@nitric/sdk'
5858

59-
const myJob = job('analyse')
59+
const analyze = job('analyze')
6060

6161
// Use `handler` to register the callback function that will run when a job is submitted
62-
myJob.handler(async (ctx: JobContext) => {
63-
// Do some work
64-
}, { cpus: 1, memory: 1024, gpus: 0 })
62+
analyze.handler(
63+
async (ctx: JobContext) => {
64+
// Do some work
65+
},
66+
{ cpus: 1, memory: 1024, gpus: 0 }
67+
)
6568
```
6669

6770
```python
@@ -84,7 +87,7 @@ Nitric.run()
8487
import 'package:nitric_sdk/nitric.dart';
8588
8689
void main() {
87-
final job = Nitric.job("batch-jobs");
90+
final job = Nitric.job("analyze");
8891
8992
job.handler((ctx) async {
9093
print("New job submitted for ${ctx.req.jobName}: ${ctx.req.message}");

src/pages/reference/dart/batch/job-handler.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Job handlers are the code that is run when a job request is submitted. These han
88
```dart
99
import 'package:nitric_sdk/nitric.dart';
1010
11-
final analyse = Nitric.job("analyse").allow([JobPermission.submit]);
11+
final analyze = Nitric.job("analyze").allow([JobPermission.submit]);
1212
13-
analyse.handler((ctx) async {
13+
analyze.handler((ctx) async {
1414
return ctx;
1515
}, opts: JobResourceRequirements(cpus: 1, memory: 2048, gpus: 0));
1616
```
@@ -51,9 +51,9 @@ batch-services:
5151
```dart
5252
import 'package:nitric_sdk/nitric.dart';
5353

54-
final analyse = Nitric.job("analyse").allow([JobPermission.submit]);
54+
final analyze = Nitric.job("analyze").allow([JobPermission.submit]);
5555

56-
analyse.handler((ctx) async {
56+
analyze.handler((ctx) async {
5757
return ctx;
5858
});
5959
```
@@ -63,9 +63,9 @@ analyse.handler((ctx) async {
6363
```dart
6464
import 'package:nitric_sdk/nitric.dart';
6565
66-
final analyse = Nitric.job("analyse").allow([JobPermission.submit]);
66+
final analyze = Nitric.job("analyze").allow([JobPermission.submit]);
6767
68-
analyse.handler((ctx) async {
68+
analyze.handler((ctx) async {
6969
return ctx;
7070
}, opts: JobResourceRequirements(cpus: 1, memory: 2048, gpus: 1));
7171
```

src/pages/reference/dart/batch/job-submit.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Jobs may be submitted from Nitric `services` or other `batches` using the `submi
88
```dart
99
import 'package:nitric_sdk/nitric.dart';
1010
11-
final analyse = Nitric.job("analyse").allow([JobPermission.submit]);
11+
final analyze = Nitric.job("analyze").allow([JobPermission.submit]);
1212
13-
await analyse.submit({ message: "message contents" });
13+
await analyze.submit({ message: "message contents" });
1414
```
1515

1616
## Parameters
@@ -28,7 +28,7 @@ await analyse.submit({ message: "message contents" });
2828
```dart
2929
import 'package:nitric_sdk/nitric.dart';
3030
31-
final analyse = Nitric.job("analyse").allow([JobPermission.submit]);
31+
final analyze = Nitric.job("analyze").allow([JobPermission.submit]);
3232
33-
await analyse.submit({ message: "data contents" });
33+
await analyze.submit({ message: "data contents" });
3434
```

src/pages/reference/dart/batch/job.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Creates a new Batch Job.
88
```dart
99
import 'package:nitric_sdk/nitric.dart';
1010
11-
final analyse = Nitric.job("analyse");
11+
final analyze = Nitric.job("analyze");
1212
```
1313

1414
## Parameters
@@ -27,13 +27,13 @@ final analyse = Nitric.job("analyse");
2727
```dart
2828
import 'package:nitric_sdk/nitric.dart';
2929
30-
final analyse = Nitric.job("analyse");
30+
final analyze = Nitric.job("analyze");
3131
```
3232

3333
### Create a Job with permissions to submit jobs
3434

3535
```dart
3636
import 'package:nitric_sdk/nitric.dart';
3737
38-
final analyse = Nitric.job("analyse").allow([JobPermission.submit]);
38+
final analyze = Nitric.job("analyze").allow([JobPermission.submit]);
3939
```

src/pages/reference/go/batch/job-handler.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import (
1414
)
1515

1616
func main() {
17-
analyse := nitric.NewJob("analyse")
17+
analyze := nitric.NewJob("analyze")
1818

19-
analyse.Handler(nitric.JobResourceRequirements{
19+
analyze.Handler(nitric.JobResourceRequirements{
2020
Cpus: 1,
2121
Memory: 2048,
2222
Gpus: 0,
@@ -72,9 +72,9 @@ import (
7272
)
7373

7474
func main() {
75-
analyse := nitric.NewJob("analyse")
75+
analyze := nitric.NewJob("analyze")
7676

77-
analyse.Handler(nitric.JobResourceRequirements{}, func(ctx *batch.Ctx) {
77+
analyze.Handler(nitric.JobResourceRequirements{}, func(ctx *batch.Ctx) {
7878
// do long running work
7979
})
8080

@@ -95,9 +95,9 @@ import (
9595
)
9696

9797
func main() {
98-
analyse := nitric.NewJob("analyse")
98+
analyze := nitric.NewJob("analyze")
9999

100-
analyse.Handler(nitric.JobResourceRequirements{
100+
analyze.Handler(nitric.JobResourceRequirements{
101101
Cpus: 1,
102102
Memory: 2048,
103103
Gpus: 0,

src/pages/reference/go/batch/job-submit.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ import (
1414
)
1515

1616
func main() {
17-
analyse, err := nitric.NewJob("analyse").Allow(nitric.JobSubmit)
17+
analyze, err := nitric.NewJob("analyze").Allow(nitric.JobSubmit)
1818
if err != nil {
1919
fmt.Println(err)
2020
}
2121

22-
analyse.Submit(context.TODO(), map[string]interface{}{
22+
analyze.Submit(context.TODO(), map[string]interface{}{
2323
"message": "message contents",
2424
})
2525

@@ -50,12 +50,12 @@ import (
5050
)
5151

5252
func main() {
53-
analyse, err := nitric.NewJob("analyse").Allow(nitric.JobSubmit)
53+
analyze, err := nitric.NewJob("analyze").Allow(nitric.JobSubmit)
5454
if err != nil {
5555
fmt.Println(err)
5656
}
5757

58-
analyse.Submit(context.TODO(), map[string]interface{}{
58+
analyze.Submit(context.TODO(), map[string]interface{}{
5959
"message": "message contents",
6060
})
6161

src/pages/reference/go/batch/job.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
)
1414

1515
func main() {
16-
analyse := nitric.NewJob("analyse")
16+
analyze := nitric.NewJob("analyze")
1717

1818
if err := nitric.Run(); err != nil {
1919
fmt.Println(err)
@@ -42,7 +42,7 @@ import (
4242
)
4343

4444
func main() {
45-
analyse := nitric.NewJob("analyse")
45+
analyze := nitric.NewJob("analyze")
4646

4747
if err := nitric.Run(); err != nil {
4848
fmt.Println(err)
@@ -60,7 +60,7 @@ import (
6060
)
6161

6262
func main() {
63-
analyse, err := nitric.NewJob("analyse").Allow(nitric.JobSubmit)
63+
analyze, err := nitric.NewJob("analyze").Allow(nitric.JobSubmit)
6464
if err != nil {
6565
fmt.Println(err)
6666
}

src/pages/reference/nodejs/batch/job-handler.mdx

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ Job handlers are the code that is run when a job request is submitted. These han
88
```ts
99
import { job, JobContext } from '@nitric/sdk'
1010

11-
const analyse = job('analyse')
12-
13-
analyse.handler(async (ctx: JobContext) => {
14-
// Do some work
15-
return ctx
16-
}, { cpus: 1, memory: 1024, gpus: 0 })
11+
const analyze = job('analyze')
12+
13+
analyze.handler(
14+
async (ctx: JobContext) => {
15+
// Do some work
16+
return ctx
17+
},
18+
{ cpus: 1, memory: 1024, gpus: 0 }
19+
)
1720
```
1821

1922
## Defining Batches
@@ -53,9 +56,9 @@ batch-services:
5356
```ts
5457
import { job, JobContext } from '@nitric/sdk'
5558

56-
const analyse = job('analyse')
59+
const analyze = job('analyze')
5760

58-
analyse.handler(async (ctx: JobContext) => {
61+
analyze.handler(async (ctx: JobContext) => {
5962
// Do some work
6063
return ctx
6164
})
@@ -66,10 +69,13 @@ analyse.handler(async (ctx: JobContext) => {
6669
```ts
6770
import { job, JobContext } from '@nitric/sdk'
6871

69-
const analyse = job('analyse')
72+
const analyze = job('analyze')
7073

71-
analyse.handler(async (ctx: JobContext) => {
72-
// Do some work
73-
return ctx
74-
}, { cpus: 1, memory: 2048, gpus: 0 })
74+
analyze.handler(
75+
async (ctx: JobContext) => {
76+
// Do some work
77+
return ctx
78+
},
79+
{ cpus: 1, memory: 2048, gpus: 0 }
80+
)
7581
```

src/pages/reference/nodejs/batch/job-submit.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Jobs may be submitted from Nitric `services` or other `batches` using the `submi
88
```ts
99
import { job } from '@nitric/sdk'
1010

11-
const analyse = job('analyse').allow('submit')
11+
const analyze = job('analyze').allow('submit')
1212

13-
await analyse.submit({ message: 'message contents' })
13+
await analyze.submit({ message: 'message contents' })
1414
```
1515

1616
## Parameters
@@ -28,7 +28,7 @@ await analyse.submit({ message: 'message contents' })
2828
```ts
2929
import { job } from '@nitric/sdk'
3030

31-
const analyse = job('analyse').allow('submit')
31+
const analyze = job('analyze').allow('submit')
3232

33-
await analyse.submit({ message: 'message contents' })
33+
await analyze.submit({ message: 'message contents' })
3434
```

src/pages/reference/nodejs/batch/job.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Creates a new Batch Job.
88
```ts
99
import { job } from '@nitric/sdk'
1010

11-
const analyse = job('analyse')
11+
const analyze = job('analyze')
1212
```
1313

1414
## Parameters
@@ -27,13 +27,13 @@ const analyse = job('analyse')
2727
```ts
2828
import { job } from '@nitric/sdk'
2929

30-
const analyse = job('analyse')
30+
const analyze = job('analyze')
3131
```
3232

3333
### Create a Job with permissions to submit jobs
3434

3535
```ts
3636
import { job } from '@nitric/sdk'
3737

38-
const analyse = job('analyse').allow('submit')
38+
const analyze = job('analyze').allow('submit')
3939
```

0 commit comments

Comments
 (0)