Insert Jobs From SQL? #1006
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. |
Beta Was this translation helpful? Give feedback.
-
|
This is helpful thank you! |
Beta Was this translation helpful? Give feedback.
-
|
We added some formal docs on this here: |
Beta Was this translation helpful? Give feedback.
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.
Beta Was this translation helpful? Give feedback.
All reactions