Skip to content

Instantly share code, notes, and snippets.

@allthesignals
Created June 28, 2019 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allthesignals/e28d35d76dfa463afb6a5d796d7c61b3 to your computer and use it in GitHub Desktop.
Save allthesignals/e28d35d76dfa463afb6a5d796d7c61b3 to your computer and use it in GitHub Desktop.
export default class CartoDataProvider extends Component {
@service
router;
@service
store;
modelName = 'carto-geojson-feature';
modelId = null;
@keepLatestTask({ retryable: delayRetryPolicy, maxConcurrency: 1 })
findRecordTask = function* () {
return yield this.store.findRecord(this.modelName, this.modelId);
};
@computed('modelName', 'modelId')
get taskInstance() {
return this.findRecordTask.perform();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment