Skip to content

Instantly share code, notes, and snippets.

{
"query": {
"constant_score": {
"filter": {
"or": [
{
"has_child": {
"query": {
"filtered": {
"query": {
199 $em = $this->getEntityManager();
200 try {
201 $em->getConnection()->beginTransaction(); //according http://stackoverflow.com/a/16271223, transaction automatically releases row-level write lock
202 $stays = $this->findMatchingGuestStayImports($property, $importedGuestStay, true /* lock records */);
203 /**
204 * @var GuestStay $firstStay
205 */
206 $firstStay = reset($stays);
207 if (count($stays) > 1) {
208 $em->getConnection()->commit();
Array
(
[REDIRECT_INDEX_PAGE] => app
[REDIRECT_STATUS] => 200
[INDEX_PAGE] => app
[HTTP_ACCEPT] => */*
[CONTENT_LENGTH] => 1095
[HTTP_EXPECT] => 100-continue
[CONTENT_TYPE] => multipart/form-data; boundary=----------------------------b83370ced482
Array
(
[REDIRECT_INDEX_PAGE] => app_stage
[REDIRECT_STATUS] => 200
[INDEX_PAGE] => app_stage
[HTTP_HOST] => inguest-stage.revinate.com
[HTTP_ACCEPT] => */*
[CONTENT_LENGTH] => 1095
[HTTP_EXPECT] => 100-continue
[CONTENT_TYPE] => multipart/form-data; boundary=----------------------------e976ec0e14a7
CODE:
<?php
$header = apache_request_headers();
$request_body = @file_get_contents(STDIN);
$f = fopen('/tmp/test-request' . date('Y-m-d-h:i:s'), 'a+');
fwrite($f, json_encode($header) . PHP_EOL);
$body = file_get_contents('php://input');
fwrite($f, $body . PHP_EOL);
fwrite($f, json_encode($_POST) . PHP_EOL);
fclose($f);
query: SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
params: []
query: SELECT g0_.id AS id0, g0_.guest_id AS guest_id1, g0_.property_id AS property_id2, g0_.method AS method3, g0_.value AS value4, g0_.sanitized_value AS sanitized_value5, g0_.created_at AS created_at6, g0_.updated_at AS updated_at7, g0_.is_from_pms AS is_from_pms8, g0_.is_valid AS is_valid9, g0_.guest_list_import_history_id AS guest_list_import_history_id10, g0_.is_primary AS is_primary11, g0_.guest_id AS guest_id12, g0_.property_id AS property_id13, g0_.guest_list_import_history_id AS guest_list_import_history_id14 FROM GuestContact g0_ WHERE (g0_.sanitized_value = ? AND g0_.method = ?) AND g0_.property_id = ? AND g0_.guest_id = ? AND g0_.is_from_pms = ? LIMIT 1 FOR UPDATE
params: ["+13105532482","sms",4,null,true]
query: SELECT g0_.id AS id0, g0_.guest_id AS guest_id1, g0_.property_id AS property_id2, g0_.method AS method3, g0_.value AS value4, g0_.sanitized_value AS sanitized_value5, g0_.created_at AS created_at6, g0_.updated_at
query: "COMMIT"
params: null
query: SELECT g0_.id AS id0, g0_.push_id AS push_id1, g0_.created_at AS created_at2, g0_.updated_at AS updated_at3, g0_.guest_identity_id AS guest_identity_id4, g0_.guest_list_import_history_id AS guest_list_import_history_id5, g0_.guest_identity_id AS guest_identity_id6, g0_.guest_list_import_history_id AS guest_list_import_history_id7 FROM Guest g0_ WHERE g0_.id = ?
params: [2756156]
query: SELECT t0.id AS id1, t0.name AS name2, t0.isStopped AS isStopped3, t0.lastConfigurationStoppedAt AS lastConfigurationStoppedAt4, t0.lastScriptStartedAt AS lastScriptStartedAt5 FROM CommandRunnerConfiguration t0 WHERE t0.name = ? LIMIT 1
params: ["revinate:guestList:manualImportProcess"]
query: SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
params: []
query: "START TRANSACTION"
params: null
query: SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
params: []
query: "START TRANSACTION"
params: null
query: SELECT DISTINCT id0 FROM (SELECT g0_.id AS id0, g0_.guest_id AS guest_id1, g0_.property_id AS property_id2, g0_.token AS token3, g0_.confirmation_code AS confirmation_code4, g0_.room_number AS room_number5, g0_.checkin_date_time AS checkin_date_time6, g0_.booking_date AS booking_date7, g0_.checkin_date AS checkin_date8, g0_.is_checked_in AS is_checked_in9, g0_.checkout_date AS checkout_date10, g0_.trip_type AS trip_type11, g0_.room_type AS room_type12, g0_.room_rate AS room_rate13, g0_.reservation_source AS reservation_source14, g0_.reservation_amount AS reservation_amount15, g0_.is_from_pms AS is_from_pms16, g0_.guest_list_import_history_id AS guest_list_import_history_id17, g0_.hash AS hash18, g0_.debug_hash AS debug_hash19, g0_.private_id AS private_id20, g0_.email AS email21, g0_.phone AS phone22, g0_.average_room_rate AS average_room_rate23, g0_.title AS title24, g0_.online_checkin_at
Job 11319: 2014-05-13 15:02:30 PDT - statds incrementing New guest gets persisted during import --- historyId : 11136, email : [email protected]
Job 11319: 2014-05-13 15:02:30 PDT - statds incrementing saving guest stay --- 1202 s. gumwood__sep____sep__pharr__sep__tx__sep__78577__sep__us__sep____sep____sep__benjamin__sep__zepeda__sep__tijerinajessica@yahoo.com__sep__956-330-9018__sep__515__sep__85.00__sep____sep____sep____sep____sep__1399766400__sep__1399939200__sep____sep__78577__sep__
Job 11319: 2014-05-13 15:02:30 PDT - statds incrementing New guest gets schedule to be inserted ---
Job 11319: 2014-05-13 15:02:31 PDT - statds incrementing new guest stay created by pms/manual upload --- propertyId : 4, guestStayId : 2915363
Job 11319: 2014-05-13 15:02:31 PDT - statds incrementing indexing guest stay --- 1202 s. gumwood__sep____sep__pharr__sep__tx__sep__78577__sep__us__sep____sep____sep__benjamin__sep__zepeda__sep__tijerinajessica@yahoo.com__sep__956-330-9018__sep__515__sep__85.00__sep____sep____sep__
daiyi at Daiyi in ~
$ npm uninstall -g faker
unbuild [email protected]
daiyi at Daiyi in ~
$ npm uninstall -g moment
unbuild [email protected]
daiyi at Daiyi in ~
$ npm uninstall -g Faker
npm WARN uninstall not installed in /usr/local/lib/node_modules: "Faker"
daiyi at Daiyi in ~