Skip to content

Instantly share code, notes, and snippets.

@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
throws ServletException, IOException {
final String requestTokenHeader = request.getHeader("Authorization");
String uri = request.getRequestURI();
if (uri.contains("/cart/add-cart")
|| uri.contains("/api/inventory/find-all")
|| uri.contains("/api/information/find-option-set-value-by-code")
|| uri.contains("/api/information/config")
|| uri.contains("/api/auth/login")
The terminal process failed to launch: A native exception occurred during launch (The module '/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar.unpacked/node-pty/build/Release/pty.node'

Giải pháp handle các job vContract

Ý tưởng

  • Tạo ra 3 ThreadPool khác nhau (Mỗi pool dùng cho mục đích handle task nặng, trung bình, nhẹ)
  • Mỗi ThreadPool tự implement executor service với priority riêng (Khi các job được submit vào trong ThreadPool tương ứng sẽ được đặt priority - priority tuỳ cách định nghĩa, priority càng thấp thì thứ tự ưu tiên càng cao)

Áp dụng

  • Tạm gọi 3 ThreadPool là HIGH-POOL, MEDIUM-POOL, và Low-POOL
  • HIGH-POOL: nhận các job nặng như thực hiện lập lô hợp đồng, lô khách hàng, lô người dùng
https://drive.google.com/drive/folders/1C3pbopzqWu20HtV8i1zLzz1SZEJOIQyo?usp=share_link
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8" />
<head>
<style>
a {
text-decoration: none;
}
https://www.overleaf.com/read/pyntqgsyfwrt
https://www.osside.net/2022/01/how-to-install-gnome-42-on-arch-linux/
This file has been truncated, but you can view the full file.
{"_type":"export","__export_format":4,"__export_date":"2022-02-15T14:18:37.996Z","__export_source":"insomnia.desktop.app:v2021.7.2","resources":[{"_id":"req_db38a62e85f94cbc9641c7d5846515b6","parentId":"wrk_8fc29f20e24e47a3b322543018153c4f","modified":1644747260216,"created":1642926594969,"url":"http://8a04-2402-800-61c5-ac34-7d24-6035-b37d-95d1.ngrok.io:8005/api/user-service/login","name":"test","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"username\":\"thdtt\",\n\t\"password\":\"hihaiho\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_71d68f4b165b47c8a0583b871f974c9a","disabled":false},{"id":"pair_8de4860db1c34f4c851e978e8a82d27c","name":"","value":"","description":""}],"authentication":{},"metaSortKey":-1642926594969,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"requ
@thdtt
thdtt / profile.ps1
Last active May 12, 2022 14:28
PowerShell profile
# Function
Function cd_home {Set-Location -Path C:\Users\thanh}
Function cd_root {Set-Location -Path C:\}
Function cd_rabbitmq {Set-Location -Path 'C:\Program Files\RabbitMQ Server\rabbitmq_server-3.9.13\sbin'}
Function ls_hidden($path) {Get-ChildItem -Force "$path"}
Function rmf_path($path) {Remove-Item -r -fo "$path"}
Function take_path($path) {
mkdir "$path"
Set-Location -Path "$path"
}
version: "3"
services:
mysql-jcia-db:
image: "mysql:8.0.25"
environment:
- MYSQL_USER=thdtt
- MYSQL_ROOT_PASSWORD=Hihahiho09620@
- MYSQL_PASSWORD={[(Hash123!@#ing)]}