Skip to content

Instantly share code, notes, and snippets.

@jorgecc
Created December 9, 2018 18:48
Show Gist options
  • Save jorgecc/9843e4c653c533db8c3d5f7748bfb1a4 to your computer and use it in GitHub Desktop.
Save jorgecc/9843e4c653c533db8c3d5f7748bfb1a4 to your computer and use it in GitHub Desktop.
BuyMilk3
<?php
// database configuration
$smachine->tableJobs="buymilk_jobs";
$smachine->tableJobLogs="buymilk_logs"; // it is optional
$smachine->setDB('localhost',"root","abc.123","statemachinedb");
$smachine->createDbTable(false); // you don't need to create this table every time.
$smachine->loadDBAllJob(); // we load all jobs, including finished ones.
//$smachine->loadDBActiveJobs(); // use this in production, we don't need stopped job every time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment