Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
awesim-documentation
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gateways
awesim-documentation
Wiki
Port an existing app to OOD
Changes
Page history
New page
Templates
Clone repository
Updated Port an existing app to OOD (markdown)
authored
8 years ago
by
Eric Franz
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Port-an-existing-app-to-OOD.md
+26
-0
26 additions, 0 deletions
Port-an-existing-app-to-OOD.md
with
26 additions
and
0 deletions
Port-an-existing-app-to-OOD.md
View page @
417dd248
...
...
@@ -125,6 +125,32 @@ $ scl enable git19 rh-ruby22 -- bin/bundle install --path=vendor/bundle
$ scl enable git19 rh-ruby22 -- bin/rake db:setup RAILS_ENV=development
```
#### 7. Explicitly update status of jobs on each request
In v1.0.0 of osc_machete_rails we tried to auto-update the active jobs of all Statusable subclass instances. This hasn't worked reliably. To undo this change:
1.
Add
`config/initializers/osc_machete_rails.rb`
```diff
+OscMacheteRails.update_status_of_all_active_jobs_on_each_request = false
```
2. For each simulations controller add a before action and a method to update the active jobs:
```diff
class SimulationsController < ApplicationController
before_action :set_simulation, only: [:show, :edit, :update, :destroy, :submit, :copy]
+ before_action :update_jobs, only: [:index, :show]
...
+ def update_jobs
+ SimulationJob.active.to_a.each(&:update_status!)
+ end
end
```
## Test Changes
Test to make sure everything's working properly.
...
...
This diff is collapsed.
Click to expand it.