"MAX": 5,
"MIN": 1,
"IDLETIMEOUT": 500000,
- "REAPINTERVAL": 500
+ "REAPINTERVAL": 500,
+ "MAXWAITINGCLIENTS": 20
}
},
"TIC_CORE": {
logger.info('DB Connection Success !');
resolve(mariasqlClient);
});
-
- // mariasqlClient.on('connect', function () {
- // logger.info('DB - connect');
- // resolve(client);
- // })
- // .on('error', function (err) {
- // logger.info('DB - error');
- // reject(err);
- // }).on('close', function (hadError) {
- // logger.info('DB - close');
- // resolve();
- // }).on('ready', function () {
- // logger.info('DB - ready');
- // resolve(mariasqlClient);
- // });
});
},
resolve();
});
client.disconnect();
+ client.end();
+ client._handle = null;
});
- // cliend.end();
- // client._handle = null;
},
validate: function (client) {
reapIntervalMillis: AppConfig.DATABASE.POOL.REAPINTERVAL,
+ maxWaitingClients: AppConfig.DATABASE.POOL.MAXWAITINGCLIENTS,
+
returnToHead: true
});
-
- // self.pool.drain().then(function () {
- // self.pool.clear();
- // });
-
-
};
dbPool.prototype.query = function query (query, params) {
return resolve(meta);
});
}).catch(function (err) {
+ logger.error(err.message);
return reject(err);
});
});
};
-
-// process.on('exit', function () {
-// dbPool.drain(function () {
-// dbpool.clear();
-// });
-// });
-
module.exports = dbPool;
\ No newline at end of file
var logger = JL('dbquery.js');
var _ = require('lodash');
-// var sequelize = require('./dbpool');
var dbpool = require('./dbpool');
var pool = new dbpool({});
-// function fnCallback() {};
-// setInterval(function () {
-// pool.query('show tables', {});
-// console.log(process.memoryUsage());
-// }, 1000);
process.on('exit', function () {
pool.drain(function () {
display: table-cell;
}
#tic-job-list {
- height: calc(100vh - 210px);
+ height: calc(100vh - 285px);
display: inline-block;
width: 100%;
+ text-align: center;
}
#tic-job-section .panel-heading .pull-right {
margin-top: -20px;
#tic-job-list .btncancel {
background-color: darkslategray;
}
+.empty_job_table_row > td {
+ height: 40px;
+ overflow: hidden;
+}
+.job_table_row {
+ width: 100%;
+}
.extended_job_table_row {
border: 1px solid #eee;
border-radius: 3px;
overflow: auto;
}
td.extended_job_table_container {
- height: 10vh;
+ height: 13vh;
}
tr.extended_job_table_row:hover {
background-color: rgba(13, 19, 14, 0.71);
tr.extended_job_table_row:hover td {
background-color: transparent;
}
-#tic-job-table {
- height: calc(100vh - 320px);
- text-overflow: ellipsis;
- text-align: center;
- table-layout: auto;
-}
#tic-job-table th {
text-align: center;
height: 38px;
vertical-align: middle;
}
-#tic-job-table tr {
- height: 38px;
-}
-#tic-job-table td {
- height: 38px;
- vertical-align: middle;
- padding: 1px;
-}
#tic-job-list-pagination {
float: right;
text-overflow: ellipsis;
white-space:nowrap;
overflow: hidden;
- display: table-cell;
+ display: table-row;
}
.image-list-btndownload {
min-width: 10px;
float: left;
display: table;
padding-top: 20px;
- height: 4vh;
}
#tic-image-list-content {
height: calc(100vh - 320px);
<div id="tic-job-list">
<div id="tic-job-list-content">
<div>
- <table class="table table-hover table-bordered" id="tic-job-table">
+ <table class="table table-hover table-bordered ui-responsive" id="tic-job-table">
<thead>
<tr class="filters text-center">
<th>#</th>
</table>
</div>
</div>
- <div id="tic-job-list-pagination">
+ <!--<div id="tic-job-list-pagination">
<ul class="pagination pagination-sm">
<li class="disabled"><a href="#"><span class="glyphicon glyphicon-chevron-left"></span></a></li>
<li class="disabled"><a href="#"><span class="glyphicon glyphicon-chevron-right"></span></a></li>
</ul>
- </div>
+ </div>-->
+ </div>
+ <div id="tic-job-list-pagination">
+ <ul class="pagination pagination-sm">
+ <li class="disabled"><a href="#"><span class="glyphicon glyphicon-chevron-left"></span></a></li>
+ <li class="disabled"><a href="#"><span class="glyphicon glyphicon-chevron-right"></span></a></li>
+ </ul>
</div>
</div>
</div>
// log
new JobLog({
- msg: 'Image created successfully.',
+ msg: 'An image was created successfully.',
jobId: jobId
});
// log
new JobLog({
- msg: 'Failed to create image.',
+ msg: 'Failed to create an image.',
jobId: jobId
});
// notification popup
- Util.showAlertDialog('Failed to create image. The #ID is ' + jobId + '.');
+ Util.showAlertDialog('Failed to create an image. The #ID is ' + jobId + '.');
// button enabled
$('#tic-package-create').prop('disabled', false);
var strItem = [
'<li class="list-group-item image-item">',
'<div class="image-item-title">',
- '<div class="image-list-name" title="<%= jobId %>_<%= imageFileName %>">#<%= jobId %>. <%= imageFileName %></div>',
+ '<div class="image-list-name" title="<%= jobId %>_<%= imageFileName %>">(<%= jobId %>) <%= imageFileName %></div>',
'<div class="image-list-name-btndownload"><a class="image-list-btndownload" href="<%= imagePath %>" title="<%= imageFileName %>" date-name="<%= imageFileName %>">Download</a></div>',
'<div class="image-list-name-btndownload"><a class="image-list-btndownload <%= classJobKsPath %>" href="<%= ksPath %>" title="<%= ksFileName %>" date-name="<%= ksFileName %>">KS</a></div>',
'<div class="image-list-name-btndownload"><a class="image-list-btndownload btnbiglog" data-link="<%= logPath %>" data-jobid="<%= jobId %>" title="Log" date-name="<%= logFileName %>">Log</a></div>',
'use strict';
var strEmptyRow = [
- '<tr id="job_table_row_<%= rowNum %>">',
+ '<tr id="job_table_row_<%= rowNum %>" class="empty_job_table_row">',
'<td colspan="9">There is no data.</td>',
'</tr>'
];
'use strict';
var strRow = [
- '<tr id="job_table_row_<%= jobNum %>">',
+ '<tr id="job_table_row_<%= jobNum %>" class="job_table_row">',
'<td><%= jobNum %></td>',
'<td class="<%= classJobStatus %>" title="<%= jobStatus %>"></td>',
'<td><a class="tic-job-list-btn btndownload <%= classJobImageDownload %>" href="<%= jobImagePath %>" title="<%= jobImageName %>">Download</a></td>',