Created
June 28, 2019 23:10
-
-
Save allthesignals/e28d35d76dfa463afb6a5d796d7c61b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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