penguin/AstroJS

Javascript framework for my blog

commit 95973b73f889c6abd8abd0cc0dc12242a26f28e1

author斟酌 鵬兄 <tgckpg@gmail.com>
date2017-01-25T03:43:20Z
subjectSave cache should run in sync to ensure file exists
commit 95973b73f889c6abd8abd0cc0dc12242a26f28e1
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date:   2017-01-25T03:43:20Z

    Save cache should run in sync to ensure file exists
---
 botanjs/service/jclassresv.py | 4 ++--
 botanjs/service/jwork.py      | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/botanjs/service/jclassresv.py b/botanjs/service/jclassresv.py
index 33d53e7..66a823a 100644
--- a/botanjs/service/jclassresv.py
+++ b/botanjs/service/jclassresv.py
@@ -204,7 +204,7 @@ class BotanClassResolver:
 			return cFHash if self.returnHash else self.BotanCache( cFile )
 
 		elif self.useCache( oFile, dates ):
-			self.JWork.saveCache.delay(
+			self.JWork.saveCache(
 				oFile
 				# Content is None to initiate a compression
 				, None
@@ -253,7 +253,7 @@ class BotanClassResolver:
 
 		outputJs = wrapScope( outputJs )
 
-		[ self.JWork.saveCache if self.returnHash else self.JWork.saveCache.delay ][0] (
+		[ self.JWork.saveCache if self.returnHash else self.JWork.saveCache ][0] (
 			os.path.join( self.CR, md5[0] )
 			, outputJs
 			, "js"
diff --git a/botanjs/service/jwork.py b/botanjs/service/jwork.py
index 97e4fc9..1a3da0f 100644
--- a/botanjs/service/jwork.py
+++ b/botanjs/service/jwork.py
@@ -25,7 +25,6 @@ else:
 
 class JWork:
 
-	@app.task()
 	def saveCache( location, content = None, mode = None, externs = "" ):
 		if content != None:
 			log.info( "Writing file(" +  str( len( content ) ) + "): " + os.path.abspath( location ) )