Skip to content

Commit

Permalink
send queue 100ms time delay added
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed Sep 27, 2024
1 parent 86ce1b5 commit af322f6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/client/MainWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def update_request(self, event):
if event == True or event.maskname == "IN_MODIFY":
fdata = {}
fdata["update"]="client"
fdata["pid"] = os.getpid()
send_server(fdata)


Expand Down Expand Up @@ -271,6 +272,7 @@ def save_settings(self, a=None, b=None):
self.write_settings(data)
fdata = {}
fdata["update"]="client"
fdata["pid"] = os.getpid()
send_server(fdata)

@asynchronous
Expand Down
1 change: 1 addition & 0 deletions src/client/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def do_activate(self):
self.main.open_window_event(None)
data = {}
data["update"]="client"
data["pid"] = os.getpid()
send_server(data)


Expand Down
4 changes: 3 additions & 1 deletion src/client/util.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import sys
import json
import time
inotify_available = True
try:
import pyinotify
Expand Down Expand Up @@ -32,7 +33,8 @@ def listen(main):
def send_server(data={}):
global sending
if sending:
return
time.sleep(0.1)
send_server(data)
sending = True
try:
data["pid"] = str(os.getpid())
Expand Down
File renamed without changes.

0 comments on commit af322f6

Please sign in to comment.