فهرست منبع

removed mutex.

Signed-off-by: chanhoonseng <chanhoonseng3101@gmail.com>
chanhoonseng 7 سال پیش
والد
کامیت
cff81da6f8
1فایلهای تغییر یافته به همراه0 افزوده شده و 13 حذف شده
  1. 0 13
      core.py

+ 0 - 13
core.py

@@ -68,12 +68,6 @@ class RepeatedTimer(object):
 
 
 def fetchDataADEI():
-    if os.path.isfile(os.getcwd()+"/.mutex"):
-        #print("Process running...")
-        return
-    else:
-        #print("Created mutex")
-        file = open(os.getcwd()+'/.mutex', 'w+')
     
     with open("varname.yaml", 'r') as stream:
         try:
@@ -83,7 +77,6 @@ def fetchDataADEI():
             print(exc)
     if varname == None:
         print("Error: Empty varname file.")
-    	os.remove(os.getcwd()+"/.mutex")
         return
     
     cache_data = {}
@@ -121,8 +114,6 @@ def fetchDataADEI():
     shutil.copy(src_file, dst_file)
     
     
-    os.remove(os.getcwd()+"/.mutex")
-
     
 print "Start torrenting..."
 # it auto-starts, no need of rt.start()
@@ -160,10 +151,6 @@ class StopHandler(tornado.web.RequestHandler):
     def get(self):
         print "Stop fetchData"
         rt.stop()
-        if os.path.isfile(os.getcwd()+"/.mutex"):
-            os.remove(os.getcwd()+"/.mutex")
-
-
 class SetTimerHandler(tornado.web.RequestHandler):
     def get(self, duration):
         print "Set interval"