Články
What is parameter?
Vytvořeno 21. 11. 2023 12:41:55

Parameter is attribute of product like name, color, weight, size...

Each parameter can have several parameter values. Those values can be of different types. Based on their values, parameters are divided into following types:

boolean values like true/false, yes/no... stored in parameter_e

New project
Vytvořeno 26. 7. 2023 19:19:39

1) setup logging - same format for each application (later logs will be easier to process) 2) setup APM (check out i.e. remotedaemon_com golang app to see more)

What to do:

"es_user": "elastic", "es_pass": "change6", "app_environment": "dev", "apm_server": "http://10.0.15.34:8200"

Writing websocket
Vytvořeno 8. 7. 2023 12:46:37

How writing websocket works?

  1. User A is writing message
  2. Websocket data are sent throught WS server
  3. WS Server handles message and sent data to all users on channel
  4. User B receives data message

Format of message sent from User A:


type Message struct {
    Action          
Response ErrorRFC7807
Vytvořeno 7. 2. 2023 20:35:32

ErrorRFC7807

always use it to define response from API, for precondition failed responses.

Example


$errors = $validator->validate($website);
        if ($errors->count() > 0) {
            $errorResult = [];
            /** @var ConstraintViolationInterface $error */
            fo
Pridanie prekladov
Vytvořeno 4. 2. 2023 23:18:53

Preklady pre tabulky:

  1. vytvorim novu tabulky (napr. activityCategory)
  2. vytvorim tabulky (activityCategoryLocale)
  3. vytvorim Proxy triedu v Entity/Proxy
  4. pridam novu sekciu do CategoryTranslateCommand.php
Stripe testing
Vytvořeno 29. 1. 2023 11:06:45

stripe card: 4242 4242 4242 4242

cvc: any

date: future

How remote daemon works
Vytvořeno 16. 1. 2023 10:14:02

1) API endpoint to download URL, input: websiteUrlID, then this is sent to rabbitmq, which will download URL and store information about downloaded URL to redis / mariadb. Input is array [2312, 31231, 312031], where elements are websiteURLIds, limited to 1000 elements? API is called with limited a

Redis usage
Vytvořeno 22. 12. 2022 9:29:03

Redis usage

Redis database What is stored there Where to find
12 Session services.yaml (redis object, passed to RedisSessionHandler)
4 Doctrine Cache cache.yaml
5 PubSub nightfoxy writer command
7 HTML Cache c
Redis websites
Vytvořeno 17. 12. 2022 12:18:11

Kluc je website_ Je v nom ulozena kompletna informacia o websites (https statusy, pocet requestov, priemerna dlzka odozvy).


type RedisInfo struct {
    Statuses          map[int]int `json:"statuses"`
    AvgResponseTime   int         `json:"avg_response_time"`
    TotalRequestCount int        
Redis notification
Vytvořeno 6. 11. 2022 15:34:08

Used to notify users in "realtime" (now with redis, later with rabbitmq probably).

Structure of data stored in redis:

return [
            'type' => $this->type,
            'userId' => $this->userId,
            'data' => json_encode($this->data)
        ];

With key of format