Skip to content

Manually schedule job from another application. #1281

Answered by bensheldon
ashwin47 asked this question in Q&A
Discussion options

You must be logged in to vote

You can. New records inserted into the good_jobs table will get picked up on polling. You could also reverse engineer and use NOTIFY too.

You shouldn't. That would end up coupling the two services via the database, which would make upgrades and deployment more difficult. Also you'd need to manage both GoodJob updates and Rails updates may modify the contents of serialized_params (how Active Job serializes the job data). It would be hard.

Instead, I'd recommend making a simple HTTP API with a shared secret, or using Twirp/gRPC.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ashwin47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants