WIP: Untested, solo caricati file di test

This commit is contained in:
Riccardo Di Dato
2020-09-23 00:05:00 +02:00
parent 0c74df1983
commit d1f4f4c50c
44 changed files with 1034 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
#!/usr/local/bin/php
<?php
/******************************************
* Author : Riccardo Di Dato
* Created On : Tue Sep 22 2020
* File : processJobs.php
*******************************************/
use ASD\Context;
use ASD\DB\DaoRegistry;
use ASD\Job\JobExecutor;
use ASD\Job\LocalFilesystemComunicationStrategy;
use ASD\Job\LogManagerLoggingStrategy;
use ASD\Job\MongoJobStorageClass;
use ASD\Job\RunnableJobFactory;
use ASD\Job\SingleJobExecutionStrategy;
$buildName = getenv("ASD_BUILDNAME");
require_once ("/home/asdynamics/private/$buildName/load.php");
try{
$jobFactory = new RunnableJobFactory();
$storageClass = new MongoJobStorageClass(DaoRegistry::getDefaultMongo(), $jobFactory);
$comStrategy = new LocalFilesystemComunicationStrategy(
Context::getEnvironment()->getFilePath("comunication.shutdown"),
Context::getEnvironment()->getFilePath("comunication.execution"),
Context::getEnvironment()->getFilePath("comunication.idle")
);
$execStrat = new SingleJobExecutionStrategy();
$logStrategy = new LogManagerLoggingStrategy("job");
$executor = new JobExecutor($storageClass, $comStrategy, $execStrat, $logStrategy );
$executor->run();
exit(0);
}
catch (Exception $ex) {
var_dump($ex);
exit(1);
}
?>