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.
@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)]}