Commits

Raza Ali committed d46ffff

Profiling code to check status of modelfileformatservice variables

Probably also prevents the service from being unloaded. Needs to be
removed once the issue of losing state is resolved.

  • Participants
  • Parent commits e6701aa

Comments (0)

Files changed (2)

File grails-app/jobs/net/biomodels/jummp/core/RegistrationCheckerJob.groovy

+package net.biomodels.jummp.core
+
+import org.quartz.JobExecutionException
+import org.quartz.JobExecutionContext
+/**
+ * @short Job for cleaning the exchange directory after RTCs if they have been in the
+ * exchange for a long time. This can happen if the GC based cleaner doesnt clean up
+ * the files in the first place (which could be because the program ended before GC ran,
+ * or the GC decided theres lots of memory so it doesnt need to run. 
+ *
+ * @author Raza Ali <raza.ali@ebi.ac.uk>
+ */
+class RegistrationCheckerJob {
+    
+    def modelFileFormatService
+	
+    static triggers = {
+    	    //run on startup, and then every six hours.
+    	    simple name: 'regCheckTrigger', startDelay: 30000, repeatInterval: 5*60000  
+    }
+  
+    def execute() {
+    	    System.out.println(modelFileFormatService.status())
+    }
+
+}

File grails-app/services/net/biomodels/jummp/core/ModelFileFormatService.groovy

     */
     private final Map<String, String> plugins = new HashMap()
       
+    
+    public void status() {
+    	    System.out.println("MODEL FILE FORMAT SERVICE STATUS:")
+    	    System.out.println("SERVICES: "+services.inspect())
+    	    System.out.println("PLUGINS: "+plugins.inspect())
+    }
+    
     /**
      * Extracts the format of the supplied @p modelFiles.
      * Returns the default ModelFormat representation with an empty formatVersion, since this is expected to exist