Wrapping Legacy AngularJS App as "Business logic" from Rails #458
Replies: 3 comments 3 replies
-
The better question would be how you run your jobs? The code doesn't tell us how you run it. |
Beta Was this translation helpful? Give feedback.
-
The jobs are run using ActiveJob, backed by SideKiq. My first attempt, with run_case_job.rb instantiates Ferrum and then loads the web page that has my legacy angular app: The first attempt is obviously a lot less cumbersome however I wasn't sure if Ferrum would quit and bring down ActiveJob too! I already had the Right now however both ways periodically, say every 5 to 10 Ferrum calls, I then get a system exit, which then quits both my |
Beta Was this translation helpful? Give feedback.
-
Oh, also, I think that calling |
Beta Was this translation helpful? Give feedback.
-
I wanted to share a spike using Ferrum for wrapping legacy Angular1 app to be run as a background job. Quepid, https://github.com/o19s/quepid, is a tool for testing your search engine. It has lots of custom code written in JS. I'm using Ferrum to run a Chrome instance and execute the logic, return the JSON data, and then I can process that.
Here is the in progress PR: o19s/quepid#976
Specifically, I'd love feedback on how I am using Ferrum in my
run_case_job.rb
. One issue I am noticing is that if I quit the browser viabrowser.quit
then my Rails server quits! It appears to quit ruby, bringing down Rails...? So right now I have a@@browser
object and just don't quit it. Would love any suggestions, feedback, pointers to others who have used Ferrum in a Rails app!Plus, tell me if I am crazy!
Beta Was this translation helpful? Give feedback.
All reactions