Skip to content

Commit f8c7e94

Browse files
committed
Fix 1 second delay before display job item
1 parent bd0d7f0 commit f8c7e94

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

resources/js/screens/jobs/item.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
},
4646
4747
mounted() {
48+
this.fetchData();
4849
this.autoRefreshData();
4950
},
5051
@@ -59,12 +60,11 @@
5960
},
6061
6162
methods: {
62-
autoRefreshData() {
63+
async autoRefreshData() {
6364
setTimeout(async () => {
64-
await this.fetchData();
65-
6665
if (this.job.status === 'Pending' || this.job.status === 'Running') {
67-
this.autoRefreshData();
66+
await this.fetchData();
67+
await this.autoRefreshData();
6868
}
6969
}, 1000);
7070
},

0 commit comments

Comments
 (0)