fix: 🐛 Disable polling for targets on Desktop (#1059)

✅ Closes: ICU-3954
This commit is contained in:
Cameron Perera authored and GitHub committed 2022-04-19 09:22:13 -05:00
1 parent 26e074dbef
commit 6249e945b8
1 file changed
+13 -7
@@ -2,10 +2,10 @@ import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
import { resourceFilter } from 'core/decorators/resource-filter';
import runEvery from 'ember-pollster/decorators/route/run-every';
import config from '../../../../config/environment';
// import runEvery from 'ember-pollster/decorators/route/run-every';
// import config from '../../../../config/environment';
const POLL_TIMEOUT_SECONDS = config.sessionPollingTimeoutSeconds;
// const POLL_TIMEOUT_SECONDS = config.sessionPollingTimeoutSeconds;
export default class ScopesScopeProjectsTargetsRoute extends Route {
// =services
@@ -65,10 +65,16 @@ export default class ScopesScopeProjectsTargetsRoute extends Route {
);
}
@runEvery(POLL_TIMEOUT_SECONDS * 1000)
poller() {
return this.refresh();
}
/**
* Update: disable polling due to large amounts of sessions crashing the app
* This is a temp solution till we have a pagination on the UI
* and concrete backend solution to support large amounts of sessions.
*/
// @runEvery(POLL_TIMEOUT_SECONDS * 1000)
// poller() {
// return this.refresh();
// }
// =actions