Files
@ 43db712ac6ec
Branch filter:
Location: rattail-project/corepos-demo-poser/office_plugins/PoserDemo/PoserDemoTask.php - annotation
43db712ac6ec
1.5 KiB
text/x-php
Update composer lock per upstream changes
result of `composer update`
in particular, mailchimp/marketing was needed..but several other
things seem to have been added/changed as well..?
result of `composer update`
in particular, mailchimp/marketing was needed..but several other
things seem to have been added/changed as well..?
7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 7e0de111c894 | <?php
class PoserDemoTask extends FannieTask
{
public $name = 'Poser Demo';
public $description = 'Demo command that tries to connect to
Tailbone API, and reports success/failure.
NOTE: This task is provided by the PoserDemo plugin;
please see that for settings to control behavior.';
public $default_schedule = array(
'min' => 0,
'hour' => 5,
'day' => '*',
'month' => '*',
'weekday' => '*',
);
public function run()
{
$this->cronMsg("hello from PoserDemo!", FannieLogger::INFO);
$settings = $this->config->get('PLUGIN_SETTINGS');
$url = $settings['PoserDemoTailboneAPIURL'];
if (!$url) {
$this->cronMsg("must define the Tailbone API URL", FannieLogger::ERROR);
return;
}
$token = $settings['PoserDemoTailboneAPIToken'];
if (!$token) {
$this->cronMsg("must define the Tailbone API token", FannieLogger::ERROR);
return;
}
$verifySSL = $settings['PoserDemoTailboneAPIVerifySSL'] === 'false' ? false : true;
$posterior = new \Rattail\Posterior\Client($url, $token, $verifySSL);
try {
$response = $posterior->get('/about');
} catch (Exception $e) {
$this->cronMsg($e, FannieLogger::ERROR);
return;
}
$body = $response->getBody();
$this->cronMsg("response body was: $body", FannieLogger::INFO);
print("$body\n");
}
}
|