# Length of time completed job cards stay

**URL:** <https://discourse.openondemand.org/t/length-of-time-completed-job-cards-stay/1708>\
**Category:** Get Help\
**Tags:** question\
**Created:** [October 6, 2021, 7:00pm UTC](https://discourse.openondemand.org/t/length-of-time-completed-job-cards-stay/1708 "2021-10-06T19:00:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsand](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/rsand/32/743_2.png) [@rsand](https://discourse.openondemand.org/u/rsand)\
**Post date:** [October 6, 2021, 7:00pm UTC](https://discourse.openondemand.org/t/length-of-time-completed-job-cards-stay/1708/1 "2021-10-06T19:00:30Z")

</div>

We would like to change the length of time completed job cards stay for ‘debugging purposes’ from ‘6 more days’ to just 1 day. Is there a setting someplace to change that?

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [October 6, 2021, 7:43pm UTC](https://discourse.openondemand.org/t/length-of-time-completed-job-cards-stay/1708/2 "2021-10-06T19:43:34Z")

</div>

Doesn’t look like it’s configurable, but you could add an initializer to set it

```ruby
# /etc/ood/config/apps/dashboard/initializers/old_sessions.rb

class BatchConnect::Session
  OLD_IN_DAYS=1
end

```

---

<div class="post-metadata">

**Author:** ![rsand](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/rsand/32/743_2.png) [@rsand](https://discourse.openondemand.org/u/rsand)\
**Post date:** [October 6, 2021, 8:23pm UTC](https://discourse.openondemand.org/t/length-of-time-completed-job-cards-stay/1708/3 "2021-10-06T20:23:23Z")

</div>

> [@jeff.ohrstrom](#):
>
> ```auto
> class BatchConnect::Session
> OLD_IN_DAYS=1
> end
> 
> ```

I get this when I try the above:

#\<ActionView::Template::Error: undefined method `dataroot’ for BatchConnect::Session:Class\>

/var/www/ood/apps/sys/dashboard/app/views/batch\_connect/session\_contexts/new.html.erb:91:in `_app_views_batch_connect_session_contexts_new_html_erb__3384552976187520235_22020' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionview-5.2.6/lib/action_view/template.rb:159:in `block in render’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/activesupport-5.2.6/lib/active\_support/notifications.rb:170:in `instrument' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionview-5.2.6/lib/action_view/template.rb:354:in `instrument\_render\_template’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionview-5.2.6/lib/action\_view/template.rb:157:in `render' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionview-5.2.6/lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render\_template’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionview-5.2.6/lib/action\_view/renderer/abstract\_renderer.rb:44:in `block in instrument' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/activesupport-5.2.6/lib/active_support/notifications.rb:170:in `instrument’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionview-5.2.6/lib/action\_view/renderer/abstract\_renderer.rb:43:in `instrument' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionview-5.2.6/lib/action_view/renderer/template_renderer.rb:53:in `block in render\_template’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionview-5.2.6/lib/action\_view/renderer/template\_renderer.rb:61:in `render_with_layout' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionview-5.2.6/lib/action_view/renderer/template_renderer.rb:52:in `render\_template’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionview-5.2.6/lib/action\_view/renderer/template\_renderer.rb:16:in `render' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionview-5.2.6/lib/action_view/renderer/renderer.rb:44:in `render\_template’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionview-5.2.6/lib/action\_view/renderer/renderer.rb:25:in `render' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionview-5.2.6/lib/action_view/rendering.rb:103:in `\_render\_template’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_controller/metal/streaming.rb:219:in `_render_template' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionview-5.2.6/lib/action_view/rendering.rb:84:in `render\_to\_body’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_controller/metal/rendering.rb:52:in `render_to_body' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action_controller/metal/renderers.rb:142:in `render\_to\_body’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/abstract\_controller/rendering.rb:25:in `render' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action_controller/metal/rendering.rb:36:in `render’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_controller/metal/instrumentation.rb:46:in `block (2 levels) in render' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/activesupport-5.2.6/lib/active_support/core_ext/benchmark.rb:14:in `block in ms’  
/opt/rh/rh-ruby27/root/usr/share/ruby/benchmark.rb:308:in `realtime' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/activesupport-5.2.6/lib/active_support/core_ext/benchmark.rb:14:in `ms’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_controller/metal/instrumentation.rb:46:in `block in render' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action_controller/metal/instrumentation.rb:87:in `cleanup\_view\_runtime’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_controller/metal/instrumentation.rb:45:in `render' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action_controller/metal/implicit_render.rb:35:in `default\_render’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_controller/metal/basic\_implicit\_render.rb:6:in `block in send_action' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action_controller/metal/basic_implicit_render.rb:6:in `tap’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_controller/metal/basic\_implicit\_render.rb:6:in `send_action' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/abstract_controller/base.rb:194:in `process\_action’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_controller/metal/rendering.rb:30:in `process_action' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/abstract_controller/callbacks.rb:42:in `block in process\_action’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/activesupport-5.2.6/lib/active\_support/callbacks.rb:132:in `run_callbacks' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/abstract_controller/callbacks.rb:41:in `process\_action’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_controller/metal/rescue.rb:22:in `process_action' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action_controller/metal/instrumentation.rb:34:in `block in process\_action’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/activesupport-5.2.6/lib/active\_support/notifications.rb:168:in `block in instrument' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/activesupport-5.2.6/lib/active_support/notifications/instrumenter.rb:23:in `instrument’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/activesupport-5.2.6/lib/active\_support/notifications.rb:168:in `instrument' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action_controller/metal/instrumentation.rb:32:in `process\_action’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_controller/metal/params\_wrapper.rb:256:in `process_action' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/abstract_controller/base.rb:134:in `process’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionview-5.2.6/lib/action\_view/rendering.rb:32:in `process' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action_controller/metal.rb:191:in `dispatch’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_controller/metal.rb:252:in `dispatch' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action_dispatch/routing/route_set.rb:52:in `dispatch’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_dispatch/routing/route\_set.rb:34:in `serve' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action_dispatch/journey/router.rb:52:in `block in serve’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_dispatch/journey/router.rb:35:in `each' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action_dispatch/journey/router.rb:35:in `serve’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_dispatch/routing/route\_set.rb:840:in `call' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/rack-2.2.3/lib/rack/conditional_get.rb:27:in `call’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/rack-2.2.3/lib/rack/head.rb:12:in `call' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action_dispatch/http/content_security_policy.rb:18:in `call’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_dispatch/middleware/cookies.rb:670:in `call' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/activesupport-5.2.6/lib/active\_support/callbacks.rb:98:in `run_callbacks' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action_dispatch/middleware/callbacks.rb:26:in `call’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_dispatch/middleware/debug\_exceptions.rb:61:in `call' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/lograge-0.11.2/lib/lograge/rails\_ext/rack/logger.rb:15:in `call_app' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/railties-5.2.6/lib/rails/rack/logger.rb:26:in `block in call’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/activesupport-5.2.6/lib/active\_support/tagged\_logging.rb:71:in `block in tagged' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/activesupport-5.2.6/lib/active_support/tagged_logging.rb:28:in `tagged’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/activesupport-5.2.6/lib/active\_support/tagged\_logging.rb:71:in `tagged' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/railties-5.2.6/lib/rails/rack/logger.rb:26:in `call’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_dispatch/middleware/remote\_ip.rb:81:in `call' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/request_store-1.5.0/lib/request_store/middleware.rb:19:in `call’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_dispatch/middleware/request\_id.rb:27:in `call' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/activesupport-5.2.6/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/actionpack-5.2.6/lib/action\_dispatch/middleware/executor.rb:14:in `call' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call’  
/opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.13/gems/railties-5.2.6/lib/rails/engine.rb:524:in `call' /opt/rh/ondemand/root/usr/share/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:107:in `process\_request’  
/opt/rh/ondemand/root/usr/share/ruby/vendor\_ruby/phusion\_passenger/request\_handler/thread\_handler.rb:149:in `accept_and_process_next_request' /opt/rh/ondemand/root/usr/share/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in `main\_loop’  
/opt/rh/ondemand/root/usr/share/ruby/vendor\_ruby/phusion\_passenger/request\_handler.rb:416:in `block (3 levels) in start_threads' /opt/rh/ondemand/root/usr/share/ruby/vendor_ruby/phusion_passenger/utils.rb:113:in `block in create\_thread\_and\_abort\_on\_exception’

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [October 6, 2021, 8:57pm UTC](https://discourse.openondemand.org/t/length-of-time-completed-job-cards-stay/1708/4 "2021-10-06T20:57:05Z")

</div>

Yea, that won’t work. Maybe it’s something about redefining a constant without other redefinitions?

In any case, sorry about that! It looks like you cant change it. I’ve opened a ticket to allow for this configuration.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [April 4, 2022, 8:57pm UTC](https://discourse.openondemand.org/t/length-of-time-completed-job-cards-stay/1708/5 "2022-04-04T20:57:50Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
