Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SinLingua Toolkit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2023-118
SinLingua Toolkit
Commits
047e8a77
Commit
047e8a77
authored
Sep 03, 2023
by
SupunGurusinghe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated script
parent
415d7162
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
static/script.js
static/script.js
+18
-0
No files found.
static/script.js
View file @
047e8a77
...
...
@@ -30,3 +30,21 @@ $(document).ready(function () {
}
});
});
async
function
getRequest
(
url
=
''
)
{
const
response
=
await
fetch
(
url
,
{
method
:
'
GET
'
,
cache
:
'
no-cache
'
})
return
response
.
json
()
}
document
.
addEventListener
(
'
DOMContentLoaded
'
,
function
()
{
let
url
=
document
.
location
let
route
=
"
/flaskwebgui-keep-server-alive
"
let
interval_request
=
3
*
1000
//sec
function
keep_alive_server
()
{
getRequest
(
url
+
route
)
.
then
(
data
=>
console
.
log
(
data
))
}
setInterval
(
keep_alive_server
,
interval_request
)()
})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment