Insert Jobs From SQL? #1006
Unanswered
thezachdrake
asked this question in
Q&A
Replies: 3 comments
|
Good point, it's pretty plausible to insert jobs via any SQL with something like this: INSERT INTO river_job (
kind,
args,
max_attempts
) values (
'fake_job',
'{}',
25
);
SELECT pg_notify(current_schema() || '.river_insert', '{"queue":"default"}');That's the core set of fields without defaults on the columns, but you can of course do additional customization on properties like Note though that the unique logic is quite complicated, so unique jobs won't be usable without a fairly well-vetted client library. |
0 replies
|
This is helpful thank you! |
0 replies
|
We added some formal docs on this here: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Is there way to insert jobs with raw SQL from any language? The docs only mention the Python and Ruby libraries. It would be awesome to let any service in any language insert jobs with SQL and then let the Go engine work them.
All reactions