Skip to content

add ability to delete jobs - #22

Merged
bgentry merged 1 commit into
masterfrom
bg-job-delete
Jun 14, 2024
Merged

add ability to delete jobs#22
bgentry merged 1 commit into
masterfrom
bg-job-delete

Conversation

@bgentry

@bgentry bgentry commented Jun 11, 2024

Copy link
Copy Markdown
Contributor

Fixes #19.

Depends on riverqueue/river#390 being merged and released (in order to avoid needing a replace in the go.mod).

@bgentry
bgentry requested a review from brandur June 11, 2024 23:01
Comment thread api_handler.go
return
}

writeResponse(ctx, rw, []byte("{\"status\": \"ok\", \"num_deleted\": "+strconv.Itoa(numDeleted)+"}"))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OOC, is making your own JSON like this an optimization? IMO probably not worth the trade off of maybe accidentally returning invalid JSON. The JSON encoder is definitely slower than Rust's, but it's heavily optimized and pretty darn fast.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, I just only had static payloads up until this one and didn't bother to change it here. Definitely down with switching it to proper serialization!

@bgentry
bgentry force-pushed the bg-job-delete branch 2 times, most recently from 6ea1597 to fae956b Compare June 13, 2024 15:36
@bgentry
bgentry merged commit 29ec0dc into master Jun 14, 2024
@bgentry
bgentry deleted the bg-job-delete branch June 14, 2024 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement job delete backend API and UI call

2 participants