Increase execution time for web based queries
authorCameron Ball <cameron@cameron1729.xyz>
Sat, 4 May 2019 10:24:33 +0000 (18:24 +0800)
committerCameron Ball <cameron@cameron1729.xyz>
Sat, 4 May 2019 10:28:27 +0000 (18:28 +0800)
src/gnb.php

index 89e01fb..c8c32fb 100644 (file)
@@ -35,6 +35,8 @@ getTelegram()->addCommand(
                 'Edit' => '📓'
             ];
 
+            //WOAH NELLY!
+            ini_set('max_execution_time', '300'); //300 seconds = 5 minutes
             $songHashMap = foldMap(
                 ☐(∘(field(0), delemit(' ')))(∘(field(5), delemit('/')))
             )(foldMap(∘(lines, 'trim', 'file_get_contents'))(glob(PATH_TO_GROOVENET . '/songs.*.txt')));
@@ -70,3 +72,5 @@ getTelegram()->addCommand(
         }
     }
 );
+
+getTelegram()->commandsHandler(true); //must come afterwards because lolzer