| 
					
				 | 
			
			
				@@ -5,6 +5,7 @@ import config from "./config"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { handler as chilecultura } from "./portales/chilecultura/handler"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { handler as ciper } from "./portales/ciper/handler"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { handler as codexverde } from "./portales/codexverde/handler"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { handler as contrapoder } from "./portales/contrapoder/handler"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // import { handler as cooperativa } from "./portales/cooperativa/handler"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { handler as df } from "./portales/df/handler"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { handler as elciudadano } from "./portales/elciudadano/handler"; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -29,9 +30,9 @@ const context: Context = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   awsRequestId: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   logGroupName: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   logStreamName: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  done: () => {}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  fail: () => {}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  succeed: () => {}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  done: () => { }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  fail: () => { }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  succeed: () => { }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   getRemainingTimeInMillis: () => 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -39,6 +40,7 @@ const portalsHandlers = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   "chilecultura": chilecultura, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   "ciper": ciper, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   "codexverde": codexverde, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  "contrapoder": contrapoder, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   // "cooperativa": cooperativa, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   "df": df, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   "elciudadano": elciudadano, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -52,17 +54,18 @@ const portalsHandlers = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   "latercera": latercera, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   // "metrodesantiago": metrodesantiago, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   "tarreo": tarreo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  "theclinic": theclinic, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  "theclinic": theclinic 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const activePortalsHandlers: Array<Handler> = Object.keys(portalsHandlers) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  .filter((portalName) => ! config.DEVELOP || config.DEV_ACTIVE_PORTALS.includes(portalName)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  .filter((portalName) => !config.DEVELOP || config.DEV_ACTIVE_PORTALS.includes(portalName)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   .map((portalName) => portalsHandlers[portalName]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const cooldown = 10000; // 10 seconds 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-async function main (): Promise<void> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+async function main(): Promise<void> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  console.log(`${activePortalsHandlers}`) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   for (const portalHandler of activePortalsHandlers) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    await portalHandler(null, context, () => {}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    await portalHandler(null, context, () => { }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     await new Promise((resolve) => setTimeout(resolve, cooldown)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |