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

Commit b46d5ed

Browse files
committed
remove resource overrides
1 parent 1dd8294 commit b46d5ed

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/pages/batch.mdx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ const myJob = job('analyse')
6060

6161
// Use `handler` to register the callback function that will run when a job is submitted
6262
myJob.handler(
63+
{ cpus: 1, memory: 1024, gpus: 0 },
6364
async (ctx: JobContext) => {
6465
// Do some work
6566
},
66-
{ cpus: 1, memory: 1024, gpus: 0 }
6767
)
6868
```
6969

@@ -120,9 +120,7 @@ api.post('/submit-job', async (ctx) => {
120120
await analyze.submit(
121121
{
122122
someKey: 'someValue',
123-
},
124-
// optional job resource overrides
125-
{ cpus: 1, memory: 1024, gpus: 0 }
123+
}
126124
)
127125
})
128126
```
@@ -139,9 +137,7 @@ async def submit_job(ctx):
139137
await analyze.submit(
140138
{
141139
"someKey": "someValue"
142-
},
143-
# optional job resource overrides
144-
{ cpus: 1, memory: 1024, gpus: 0 }
140+
}
145141
)
146142

147143
Nitric.run()

0 commit comments

Comments
 (0)