This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class to handle job execution | |
*/ | |
class Jobs extends Onecore_Controller | |
{ | |
const STATUS_DONE = 'done'; | |
const STATUS_QUEUED = 'queued'; | |
const STATUS_RUNNING = 'running'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `jobs` ( | |
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT, | |
`name` VARCHAR(45) NOT NULL, | |
`payload` TEXT NULL COMMENT 'JSON payload', | |
`response` TEXT NULL, | |
`status` ENUM('running', 'queued', 'done') NOT NULL DEFAULT 'queued', | |
`run_time` DOUBLE NULL, | |
`created_dt` DATETIME NOT NULL, | |
PRIMARY KEY (`id`)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
foreach ($receivers as $receiver) | |
{ | |
$this->model->create('jobs', [ | |
'name' => 'sendEmail', | |
'payload' => json_encode([ | |
'subject' => 'My beautiful subject', | |
'type' => 'html', | |
'message' => 'This is an email!', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/bin/php /path/to/your/ci/root/folder/index.php jobs listen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import '../Config'; | |
import DebugConfig from '../Config/DebugConfig'; | |
import React, { Component } from 'react'; | |
import { Provider } from 'react-redux'; | |
import LoginContainer from './LoginContainer'; | |
import HomeContainer from './HomeContainer'; | |
import TransactionLayout from './Layout/TransactionLayout'; | |
import CreateTransactionLayout from './Layout/CreateTransactionLayout'; | |
import createStore from '../Redux'; | |
import { Router, Route, browserHistory } from 'react-router'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { connect } from 'react-redux'; | |
import { bindActionCreators } from 'redux'; | |
import TransactionActions from '../../Redux/TransactionRedux'; | |
import TransactionComponent from '../../Components/Transaction/TransactionComponent'; | |
import { browserHistory } from 'react-router'; | |
import { Row, Grid, Col } from 'react-bootstrap'; | |
import { DatePicker, RaisedButton } from 'material-ui'; | |
import FontIcon from 'material-ui/FontIcon'; | |
import IconButton from 'material-ui/IconButton'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import moment from 'moment-timezone'; | |
import TransactionRowComponent from './TransactionRowComponent'; | |
import UploadAssetsComponent from '../Common/UploadAssetsComponent'; | |
import { | |
Table, | |
TableBody, | |
TableHeader, | |
TableHeaderColumn, | |
TableRow, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import SelectField from 'material-ui/SelectField'; | |
import MenuItem from 'material-ui/MenuItem'; | |
export default class TransactionRowComponent extends Component { | |
state = { | |
value:null, | |
} | |
handleChange = (event, index, value) => { | |
this.setState({value}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Row, Grid, Col } from 'react-bootstrap'; | |
import Dialog from 'material-ui/Dialog'; | |
import FlatButton from 'material-ui/FlatButton'; | |
import RaisedButton from 'material-ui/RaisedButton'; | |
import TextField from 'material-ui/TextField'; | |
import FontIcon from 'material-ui/FontIcon'; | |
import {List, ListItem} from 'material-ui/List'; | |
import IconButton from 'material-ui/IconButton'; | |
import moment from 'moment'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y | |
sudo apt-get install libfreetype6 libfreetype6-dev -y | |
sudo apt-get install libfontconfig1 libfontconfig1-dev -y | |
cd ~ | |
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64" | |
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2 | |
sudo tar xvjf $PHANTOM_JS.tar.bz2 | |
sudo mv $PHANTOM_JS /usr/local/share | |
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin |
OlderNewer