Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
refactor(upload): defer parse of applications
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Sep 28, 2017
1 parent c84d114 commit 8692732
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
16 changes: 16 additions & 0 deletions inc/package.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,22 @@ protected function sendFile() {
exit(0);
}

/**
* get Cron description parameter for this class
*
* @param $name string name of the task
*
* @return array of string
**/
static function cronInfo($name) {

switch ($name) {
case 'ParseApplication' :
return array('description' => __('Parse an application to find metadata'));
}
}


/**
* Launch parsing of applciation files
*
Expand Down
8 changes: 4 additions & 4 deletions install/installer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,13 +507,13 @@ protected function upgradeOneStep($toVersion) {
protected function createJobs() {
CronTask::Register(PluginFlyvemdmMqttupdatequeue::class, 'UpdateTopics', MINUTE_TIMESTAMP,
[
'comment' => __('Update retained MQTT topics for fleet policies', 'flyvemdm'),
'mode' => CronTask::MODE_EXTERNAL
'comment' => __('Update retained MQTT topics for fleet policies', 'flyvemdm'),
'mode' => CronTask::MODE_EXTERNAL
]);

CronTask::Register(PluginFlyvemdmPackage::class, 'ParseApplication', MINUTE_TIMESTAMP,
CronTask::Register(PluginFlyvemdmPackage::class, 'AnalyzeApplication', MINUTE_TIMESTAMP,
[
'comment' => __('Parse uploaded applications', 'flyvemdm'),
'comment' => __('Analyze uploaded applications', 'flyvemdm'),
'mode' => CronTask::MODE_EXTERNAL
]);
}
Expand Down
Empty file modified tools/cli_install.php
100755 → 100644
Empty file.

0 comments on commit 8692732

Please sign in to comment.