Skip to content
Snippets Groups Projects
Unverified Commit 1a61f2ce authored by syuilo's avatar syuilo
Browse files

自動更新

parent 78a82935
No related branches found
No related tags found
No related merge requests found
......@@ -51,8 +51,18 @@ export default Vue.extend({
},
created() {
this.$root.api('admin/queue/stats').then(stats => {
this.stats = stats;
const fetchStats = () => {
this.$root.api('admin/queue/stats', {}, true).then(stats => {
this.stats = stats;
});
};
fetchStats();
const clock = setInterval(fetchStats, 1000);
this.$once('hook:beforeDestroy', () => {
clearInterval(clock);
});
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment