Download the PHP package tigron/skeleton-transaction without Composer

On this page you can find all versions of the php package tigron/skeleton-transaction. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package skeleton-transaction

skeleton-transaction

Description

Transactions for Skeleton. Transactions are used to perform background tasks.

Installation

Installation via composer:

composer require tigron/skeleton-transaction

Howto setup

Run the initial migrations

Create transactions

Transactions should all extend from \Skeleton\Transaction\Transaction and should implement the run() method:

<?php
/**
 * Transaction_Test
 *
 * @author Christophe Gosiau <[email protected]>
 */
class Transaction_Test extends \Skeleton\Transaction\Transaction {

    /**
     * Run
     *
     * @access public
     */
    public function run() {
        // Do your thing
        $data = $this->get_data();
    }
}

Schedule your transaction

$transaction = new Transaction_Email_Order_Canceled();
$data = [ 'some_data' => 'some_value ];
$transaction->data = $data;
$transaction->schedule();

Manage the daemon

Start the transaction daemon with the skeleton binary:

skeleton transaction:daemon start

Stop the transaction daemon

skeleton transaction:daemon stop

Get the status of the daemon

skeleton transaction:daemon status

Interact with transactions

Get a list of all scheduled transactions

skeleton transaction:list

Run a transaction

skeleton transaction:run <transaction_id>

Show the log of a transaction

skeleton transaction:log <transaction_id_or_classname>

Monitor the daemon with Nagios

Skeleton Transaction Daemon can be monitored via its status file. The status file is updated every 5 seconds and can be configured via Config:

\Skeleton\Transaction\Config::$monitor_file = '/tmp/skeleton-transaction.status';

To monitor the daemon via Nagios, a \Skeleton\Core\Web\Module is provided which will read the status file and return an appropiate response.

To enable Nagios monitoring, make sure to create a module in your application that will handle the monitoring request:

<?php
/**
  * Module monitor
  *
  * @author Christophe Gosiau <[email protected]>
  */
class Web_Module_Monitor extends \Skeleton\Transaction\Web\Module\Monitor {
}

Optionally, an authentication header can be configured:

\Skeleton\Transaction\Config::$monitor_authentication = 'YOUR_SECRET_STRING';

Nagios configuration

In Nagios, you should configure a command to call the service. We will use the built-in check_http command as a starting point:

define command {
    command_name    check_skeleton_http
    command_line    /usr/lib/nagios/plugins/check_http -H $ARG1$ -u $ARG2$ -k 'X-Authentication: $ARG3$'
}

Your service definition could then look like this:

define service {
    use                             generic-service
    host_name                       hostname.example.com
    service_description             SKELETON
    check_command                   check_skeleton_http!app.hostname.example.com!/monitor!AuThEnTiCaTiOnStRiNg
}

All versions of skeleton-transaction with dependencies

PHP Build Version
Package Version
Requires tigron/skeleton-object Version >=0.1.18
tigron/skeleton-database Version >=0.2.2
tigron/skeleton-core Version >=4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tigron/skeleton-transaction contains the following files

Loading the files please wait ....