Araeynn commited on
Commit
0ddd980
1 Parent(s): ab0b90d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -18,14 +18,8 @@ launch_time = datetime.datetime.utcnow()
18
  ph = st.empty()
19
 
20
  def syncMessages():
21
- with open("test.txt", "r") as f:
22
- r = f.read()
23
  with ph.container():
24
- delta_uptime = datetime.datetime.utcnow() - datetime.utcfromtimestamp(int(r))
25
- hours, remainder = divmod(int(delta_uptime.total_seconds()), 3600)
26
- minutes, seconds = divmod(remainder, 60)
27
- days, hours = divmod(hours, 24)
28
- st.markdown(f"`[Online Time]: [{days:02d}]d | [{hours:02d}]h | [{minutes:02d}]m | [{seconds:02d}]s`")
29
  if os.listdir("data") == []:
30
  return 0
31
  dirs = st.tabs(os.listdir("data"))
@@ -52,7 +46,7 @@ lock_file_path = "test.txt"
52
 
53
  if not os.path.exists(lock_file_path):
54
  with open(lock_file_path, "w") as f:
55
- f.write(str(int(launch_time)))
56
  clone = False
57
  st.markdown("Bot is running, reload the page to see activity.")
58
  else:
 
18
  ph = st.empty()
19
 
20
  def syncMessages():
 
 
21
  with ph.container():
22
+ st.markdown(f"`Status:` green[**Running**]")
 
 
 
 
23
  if os.listdir("data") == []:
24
  return 0
25
  dirs = st.tabs(os.listdir("data"))
 
46
 
47
  if not os.path.exists(lock_file_path):
48
  with open(lock_file_path, "w") as f:
49
+ f.write("running")
50
  clone = False
51
  st.markdown("Bot is running, reload the page to see activity.")
52
  else: