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

Commit e752f03

Browse files
committed
format
1 parent b46d5ed commit e752f03

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/pages/batch.mdx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,9 @@ import { job, JobContext } from '@nitric/sdk'
5959
const myJob = job('analyse')
6060

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

7067
```python
@@ -117,11 +114,9 @@ const api = nitric.api('public')
117114
const analyze = nitric.job('analyze').allow('submit')
118115

119116
api.post('/submit-job', async (ctx) => {
120-
await analyze.submit(
121-
{
122-
someKey: 'someValue',
123-
}
124-
)
117+
await analyze.submit({
118+
someKey: 'someValue',
119+
})
125120
})
126121
```
127122

0 commit comments

Comments
 (0)